Freigeben über


InkCollector.Cursor Property

Gets or sets the cursor that appears when the mouse pointer is over the InkCollector control.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Property Cursor As Cursor
'Usage
Dim instance As InkCollector
Dim value As Cursor

value = instance.Cursor

instance.Cursor = value
public Cursor Cursor { get; set; }
public:
property Cursor^ Cursor {
    Cursor^ get ();
    void set (Cursor^ value);
}
/** @property */
public Cursor get_Cursor ()

/** @property */
public void set_Cursor (Cursor value)
public function get Cursor () : Cursor

public function set Cursor (value : Cursor)
Not applicable.

Property Value

The cursor that appears when the mouse pointer is over the InkCollector control.

Remarks

If set to the default cursor, the inherited Default property, the behavior of the mouse cursor is based on the drawing attributes of the current cursor in view. If you then disable the object while keeping the default cursor setting, the cursor override is disabled and the mouse cursor setting is based on the underlying window's mouse cursor attributes. Setting the cursor to a null reference (Nothing in Visual Basic) (Nothing in Microsoft® Visual Basic® .NET) also disables the object's cursor handling.

If the cursor is set to anything but the default setting, the object always uses that cursor whether or not the object is enabled.

This property refers to the visual display of the pointer, and not the ink input device, which is represented by the Microsoft.Ink.Cursor class.

Example

This C# example attaches an InkCollector, theInkCollector, to the handle for a control. Both theInkCollector and the control are assigned Cursors such that when theInkCollector is enabled, the Default cursor is used, but when theInkCollector is not enabled, a cross is used as the cursor.

// In the constructor...
theInkCollector = new InkCollector(Handle);
theInkCollector.Cursor = System.Windows.Forms.Cursors.Default;
Cursor = System.Windows.Forms.Cursors.Cross;

This Visual Basic .NET example attaches an InkCollector, theInkCollector, to the handle for a control. Both theInkCollector and the control are assigned Cursors such that when theInkCollector is enabled, the Default cursor is used, but when theInkCollector is not enabled, a cross is used as the cursor.

'In New() ...
theInkCollector = New InkCollector(Handle)
theInkCollector.Cursor = System.Windows.Forms.Cursors.Default
Cursor = System.Windows.Forms.Cursors.Cross

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkCollector Class
InkCollector Members
Microsoft.Ink Namespace
InkCollector.Enabled