Jobs
Author: Moty Date Submitted: 12/6/2005 Category: Forms Compatibility: .NET,VB 6 This code has been accessed 4217 times.
Email Yourself this snippet:
No declarations
Code
Dim xm As Single 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