Gets the position of the mouse cursor in screen coordinates.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The property returns a Point that represents the mouse cursor position at the time the property was referenced. The coordinates indicate the position on the screen, not relative to the control, and are returned regardless of whether the cursor is positioned over the control. The coordinates of the upper-left corner of the screen are 0,0.
The property is identical to the Cursor.Position property.
The following code example puts a TreeNode label into an editable state when the user presses ALT+E while the mouse cursor is over the tree node. After the user is done editing the label, the labels cannot be edited again until the ALT+E key combination is pressed again. This example requires that you have a TreeView on a Form. The tree view should also have at least one TreeNode in its Nodes collection.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.