by Anonymous (267 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Sun 27th December 1998
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Move a form that has not title bar, or one that does by clicking anywhere on form
API Declarations
Private Declare Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
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(Form1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
No comments have been posted about Move a form that has not title bar, or one that does by clicking anywhere on form. Why not be the first to post a comment about Move a form that has not title bar, or one that does by clicking anywhere on form.