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
'Declaration
<BrowsableAttribute(False)> _
Public Shared ReadOnly Property MousePosition As Point
[BrowsableAttribute(false)]
public static Point MousePosition { get; }
[BrowsableAttribute(false)]
public:
static property Point MousePosition {
Point get ();
}
[<BrowsableAttribute(false)>]
static member MousePosition : Point with get
static function get MousePosition () : 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualBasic.PowerPacks Namespace
Other Resources
How to: Draw Lines with the LineShape Control (Visual Studio)
How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)