Form Move RRS feed

  • Question

  • Whenever I try to use a form move example (MouseUp, MouseDown, MouseMove), I can never get the "Point" resolved.

    "Dim mousePos As Point = Control.MousePosition"

    Sunday, July 7, 2019 3:12 AM

All replies

  • Hi,

    Control.MousePosition  is the coordinates of the control on the screen.
    e.Location is the coordinate of the control's work area on the software interface.

    Public Class Form1
        Private Sub Form1_MouseMove(sender As Object, e As MouseEventArgs) Handles MyBase.MouseMove
            Label1.Text = e.Location.X
            Label2.Text = e.Location.Y
        End Sub
    End Class

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Sunday, July 7, 2019 6:30 AM