GetCapture (coredll)
Last changed: -212.140.133.126

.
Summary
TODO - a short description

C# Signature:

[DllImport("coredll.dll")]
static extern IntPtr GetCapture();

VB .NET Signature:

Declare Function GetCapture Lib "coredll.dll" (TODO) As TODO

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

You can use GetCapture in conjunction with SetCapture to obtain the window handle of a Control. See the sample code below.

Sample Code:

public IntPtr GetHWnd(Control ctrl)
{
   IntPtr hOldWnd = GetCapture();
   ctrl.Capture = true;
   IntPtr hWnd = GetCapture();
   ctrl.Capture = false;
   SetCapture(hOldWnd);
   return hWnd;
}

Alternative Managed API:

None

Documentation
GetCapture on MSDN