Name

SetCapture

Synopsis

Sets the mouse capture for a window:

Private Declare Function SetCapture Lib "user32" Alias "SetCapture" _
		(ByVal hwnd As Long) As Long

Parameters

hwnd

The window handle of the window that should receive all mouse input

Return Value

Returns the window handle of the window that previously had the mouse capture. If no window had the mouse capture, returns a NULL.

Get Subclassing and Hooking with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.