Position Property

Cursor.Position Property


Gets or sets the cursor's position.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

static member Position : Point with get, set

Property Value

Type: System.Drawing.Point

A Point that represents the cursor's position in screen coordinates.

The Position property is identical to the Control.MousePosition property.

The following code example creates a cursor from the Current cursor's Handle, changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires a Form and a Button to call this code when it is clicked.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft