by Compudyne 2o0`1 (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating:
(4 Votes)
To Drag A Form Without Using The Annoying Blue Bar
Assumes
No need To Know Anything Sept This Will Save You Alot Of Time
Side Effects
No Side Effects
API DeclarationsPrivate Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
'Make A New Form
'Copy And Past this In the Main Code Area For
'Form
Private Sub Form_Load()
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lngReturnValue As Long
If Button = 1 Then
Call ReleaseCapture
lngReturnValue = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
'And Werk Like You would Always Werk Then
'Press
'Play And Dag It From The
'Main body Of the Form
'Instead Of the Blue Bar