Code:Public Class Form1 Dim a, b As Integer Dim newPoint As New System.Drawing.Point() Private Sub ab_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown a = Me.MousePosition.X - Me.Location.X b = Me.MousePosition.Y - Me.Location.Y End Sub Private Sub ab_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove If e.Button = MouseButtons.Left Then newPoint = Me.MousePosition newPoint.X = newPoint.X - a newPoint.Y = newPoint.Y - b Me.Location = newPoint End If End Sub End Class


Reply With Quote