VB Code:
Option Explicit
Declare Function ReleaseCapture Lib "user32" () As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const WM_NCLBUTTONDOWN = &HA1
Const HTBOTTOMRIGHT = 17
Sub DriveShangle(f As Form)
'PURPOSE: Negate VB's call to SetCapture, and tell Windows
' that the user is trying to resize the form.
'Cancel the capture on the label
ReleaseCapture
'Set the capture on the form's bottom-right grab-handle instead
SendMessage f.hwnd, WM_NCLBUTTONDOWN, HTBOTTOMRIGHT, ByVal 0&
End Sub