Partager via


CursorButtons.get_Item Method

CursorButtons.get_Item Method

Returns the CursorButton object at the known index in a CursorButtons collection.

Definition

Visual Basic .NET Public Function get_Item( _
ByVal index As Integer _
) As CursorButton
C# public CursorButton get_Item(
int index
);
Managed C++ public: CursorButton* get_Item(
int *index
);

Parameters

index System.Int32. The numeric index of the CursorButton object to return from the collection.

Return Value

Microsoft.Ink.CursorButton. Returns the CursorButton object at the known index in a CursorButtons collection.

Remarks

An error occurs if the index doesn't match any existing member of the CursorButtons collection.

Note: [C#]  Use the CursorButtons collection's indexer as shown in the following example rather than using the CursorButtons collection's get_Item method.

Examples

[C#]

This C# example gets the first CursorButton from the Buttons property of a Cursor object.

Microsoft.Ink.CursorButton theFirstButton = theCursor.Buttons[0];
                    

[VB.NET]

This Microsoft® Visual Basic® .NET example gets the first CursorButton from the Buttons property of a Cursor object.

Dim theFirstButton As Microsoft.Ink.CursorButton = theCursor.Buttons.Item(0)
                

See Also