共用方式為


Cursor Class

Cursor Class

Represents general information about a tablet pointing and selecting device.

Definition

Visual Basic .NET Public Class Cursor
Inherits Object
C# public class Cursor : Object
Managed C++ public __gc class Cursor : public Object

Members Table

The following table lists the members exposed by the object.

Methods

Method Description
Equals Leave Site Determines whether two Object Leave Site instances are equal. Inherited from Object Leave Site.
Finalize Leave Site Allows an Object Leave Site to attempt to free resources and perform other cleanup operations before the Object Leave Site is reclaimed by garbage collection. Inherited from Object Leave Site.
GetHashCode Leave Site Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. Inherited from Object Leave Site.
GetType Leave Site Gets the Type Leave Site of the current instance. Inherited from Object Leave Site.
MemberwiseClone Leave Site Creates a shallow copy of the current Object Leave Site. Inherited from Object Leave Site.
static (Shared in Visual Basic .NET)ReferenceEquals Leave Site Determines whether the specified Object Leave Site instances are the same instance. Inherited from Object Leave Site.
ToString Returns a string that represents the current Cursor object.

Properties

Property Description
Buttons Returns the CursorButtons collection that is available on a known Cursor.
DrawingAttributes Gets or sets the drawing attributes to apply to ink as it is drawn.
Id Gets the identifier of the Cursor object.
Inverted Gets a value that indicates whether the cursor is the inverted end of the pen.
Name Gets the name of the Cursor object.
Tablet Gets the tablet device to which the Cursor belongs.

Inheritance Hierarchy

Object Leave Site

Cursor

Remarks

A Cursor object represents a pointing and selecting device, such as a stylus or a mouse. Physical pens may have multiple tips—such as normal and eraser ends—with each pen tip representing a different Cursor object. A Tablet PC may allow multiple pens. Each cursor has an associated cursor identifier that is unique on a system. For more information about how pens can be used with a Tablet PC, see Pen Overview.

You can assign specific drawing attributes to a known cursor, such as whether the pen color should be red or blue. A cursor also contains a collection of zero or more CursorButton objects.

Cursors exist only within the scope of an InkCollector object, an InkOverlay object, or an InkPicture control. When one of these objects encounters a new cursor, the object fires an InkCollector.CursorInRange, an InkOverlay.CursorInRange, or an InkPicture.CursorInRange event with the NewCursor property of the InkCollectorCursorInRangeEventArgs object set to true. This allows you to set up properties in the application, such as drawing attributes, when the cursor is first encountered. The InkCollector.Cursors, InkOverlay.Cursors, and InkPicture.Cursors properties contain the collection of cursors that the object or control has encountered.

A Cursor cannot be constructed explicitly. Instead, you obtain a Cursor from either event arguments or the Cursors property of an InkCollector object, an InkOverlay object, or an InkPicture control.

Class Information

Namespace Microsoft.Ink
Assembly Microsoft.Ink (microsoft.ink.dll)
Strong Name Microsoft.Ink, Version=1.7.4009.0, Culture=neutral, PublicKeyToken=a2870d9cc4d021c8

See Also