Public Class Form1
Declare the Function SendMessage Lib "user32" Alias "SendMessageA" (_
ByVal HWND As IntPtr, _
ByVal wMsg As an Integer, _
ByVal wParam As an Integer, _
ByVal lParam As Integer) _
As a Boolean
Declare the Function ReleaseCapture Lib "user32" Alias "ReleaseCapture" () As a Boolean
Const WM_SYSCOMMAND=& H112
Const SC_MOVE=& HF010 &
Const HTCAPTION=2
Private Sub Form1_MouseMove (ByVal sender As Object, ByVal e the As System. Windows, Forms the MouseEventArgs) Handles Me. MouseMove
ReleaseCapture ()
SendMessage (Me Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0)
End Sub
The End of the Class