Shape.MousePosition Property


Gets the position of the pointer in screen coordinates.

Namespace:   Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)


public static Point MousePosition { get; }
property Point MousePosition {
    static Point get();
static member MousePosition : Point with get
Public Shared ReadOnly Property MousePosition As Point

Property Value

Type: System.Drawing.Point

The MousePosition property returns a Point that represents the pointer position at the time the property was referenced.


The coordinates returned by the MousePosition property are relative to the screen, not to the shape or its container.

See Also

Shape Class
Microsoft.VisualBasic.PowerPacks Namespace
How to: Draw Lines with the LineShape Control (Visual Studio)
How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)
Introduction to the Line and Shape Controls (Visual Studio)

Return to top