Search Tools Links Login

Borderless Form Drag


Visual Basic 6, or VB Classic

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

Original Author: Jose M. Lopez

Code

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

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 115 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.