Declare Sub ReleaseCapture Lib "user" ()
Declare Function SendMessage& Lib "user" (ByVal hWnd%, ByVal wMsg%, _ ByVal wParam%, lParam As Any) Const WM_SYSCOMMAND = &H112 Const SC_MOVE = &HF012 ' In the control's MouseDown event add: Dim ret% If Button = 1 Then ' Left button ReleaseCapture ret% = SendMessage(Picture1.hWnd, WM_SYSCOMMAND, SC_MOVE, 0) End If |