Compartir a través de


Inverted Property

Inverted Property

Gets a value that indicates whether the cursor is the inverted end of the pen.

Declaration

[C++]

[C++]
[propget] HRESULT get_Inverted ([out, retval] VARIANT_BOOL* Inverted);

[Microsoft® Visual Basic® 6.0]

[Visual Basic]
Public Property Get Inverted() As Boolean

Property Value

VARIANT_BOOL Whether the cursor is the inverted end of the pen.

This property is read-only.

Return Value

HRESULT value Description
S_OK Cursor is the inverted end of the pen.
E_INK_EXCEPTION An exception occurred while processing.
E_POINTER The context is invalid or the parameter is an invalid pointer.

Remarks

Inverted cursors are generally associated with erasing, so a known pen might have one end that is intended to draw ink and another end that is intended to erase strokes. However, behavior for when the system recognizes the inverted end of the pen is not limited to erasing. You may associate any acceptable cursor behavior with the Inverted property.

For more information about erasing ink, see Erasing Ink with the Pen.

Note: Whether or not you use the Inverted property is entirely up to the needs of your application. Applications are not required to inspect inverted cursors, and the ink collector applies default drawing attributes to inverted cursors just as it does to cursors that are not inverted.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example returns a report on the attributes of all of the cursors encountered by the InkCollector object passed in as a parameter.

Public Function CursorReport(ByVal theInkCollector As InkCollector) _
    As String
    Dim theReport As String
    theReport = "The InkCollector has encountered " & _
        "the following cursors so far:" & vbCrLf
    ' Get the Cursors collection from the InkCollector
    Dim theCursors As IInkCursors
    Set theCursors = theInkCollector.Cursors
    theReport = theReport & "Count of cursors: " & theCursors.Count & vbCrLf
    Dim theCursor As IInkCursor
    For Each theCursor In theCursors
        theReport = theReport & "Cursor Name: " & theCursor.Name & vbCrLf
        theReport = theReport & "Tablet Name: " & theCursor.Tablet.Name & vbCrLf
        theReport = theReport & "Cursor Id: " & theCursor.Id & vbCrLf
        theReport = theReport & "Cursor is inverted: " & _
            theCursor.Inverted & vbCrLf
        theReport = theReport & "Cursor Buttons:" & vbCrLf
        Dim theButton As IInkCursorButton
        For Each theButton In theCursor.Buttons
            Dim theState As InkCursorButtonState
                theState = theButton.State
            theReport = theReport & "    Button Name: " & theButton.Name & vbCrLf
            theReport = theReport & "    State: " & _
                theButton.State & vbCrLf
            theReport = theReport & "    Id: " & theButton.Id & _
                vbCrLf & vbCrLf
        Next
    Next
    CursorReport = theReport
End Function

Applies To