Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long
Public Declare Sub ReleaseCapture Lib "user32" ()
Public Const WM_NCLBUTTONDOWN = &HA1
Public Const HTCAPTION = 2
Sub moveform(frm As Form)
Dim ReturnVal As Long
ReleaseCapture
ReturnVal = SendMessage(frm.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)
End Sub