by Ze'ev Rotshtein ()
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Sat 7th June 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Move a form without using the title-bar.
MouseX = X
MouseY = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoEvents
If Button = vbLeftButton Then
Left = Left - (MouseX - X)
Top = Top - (MouseY - Y)
End If
End Sub