- Home
·
- Miscellaneous
·
- Allows the user to move the form via drag and drop without having to use the windows title bar at t
Allows the user to move the form via drag and drop without having to use the windows title bar at t
Allows the user to move the form via drag and drop without having to use the windows title bar at the top. Useful if you have a form with
API Declarations
Dim varY As Integer
Dim varX As Integer
Rate Allows the user to move the form via drag and drop without having to use the windows title bar at t
(2(2 Vote))
Call MDown(X, Y)
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call MMove(X, Y)
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call MUp(X, Y)
End Sub
Private Sub MUp(X2 As Single, Y2 As Single)
Down = False
End Sub
Private Sub MMove(X2 As Single, Y2 As Single)
If Down = True Then
Form1.Left = Form1.Left + X2 - varX
Form1.Top = Form1.Top + Y2 - varY
X2 = varX
Y2 = varY
End If
End Sub
Private Sub MDown(X2 As Single, Y2 As Single)
Down = True
varX = X2
varY = Y2
End Sub
Allows the user to move the form via drag and drop without having to use the windows title bar at t Comments
No comments yet — be the first to post one!
Post a Comment