VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Another simple idea for dragging a form without a control box.

by Moty (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 12th June 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Another simple idea for dragging a form without a control box.

Rate Another simple idea for dragging a form without a control box.



Dim ym As Single

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
xm = X
ym = Y
End Sub

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


Download this snippet    Add to My Saved Code

Another simple idea for dragging a form without a control box. Comments

No comments have been posted about Another simple idea for dragging a form without a control box.. Why not be the first to post a comment about Another simple idea for dragging a form without a control box..

Post your comment

Subject:
Message:
0/1000 characters