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)

Syntax

[BrowsableAttribute(false)]
public static Point MousePosition { get; }
public:
[BrowsableAttribute(false)]
property Point MousePosition {
    static Point get();
}
[<BrowsableAttribute(false)>]
static member MousePosition : Point with get
<BrowsableAttribute(False)>
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.

Remarks

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