VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Borderless Form Drag

by Jose M. Lopez (10 Submissions)
Category: Coding Standards
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

To drag a borderless form.
Very Easy and Simple.
Just a few lines of code.

Rate Borderless Form Drag

Dim DragX As Long, DragY As Long
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DragX = X: DragY = Y
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Form1.Move Form1.Left + X - DragX, Form1.Top + Y - DragY
End If
End Sub

Download this snippet    Add to My Saved Code

Borderless Form Drag Comments

No comments have been posted about Borderless Form Drag. Why not be the first to post a comment about Borderless Form Drag.

Post your comment

Subject:
Message:
0/1000 characters