Share via


DefaultTablet Property

DefaultTablet Property

Returns the default tablet within the set of available tablets.

Declaration

[C++]

[propget] HRESULT get_DefaultTablet ([out, retval] IInkTablet**
    DefaultTablet);

[Microsoft® Visual Basic® 6.0]

Public Property Get DefaultTablet() As IInkTablet

Property Value

IInkTablet Returns the default IInkTablet object within the set of available tablets.

This property is read-only.

Return Value

HRESULT value Description
S_OK Success.
E_FAIL An unspecified error occurred.
E_POINTER The parameter pointer was invalid.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

The platform determines the default IInkTablet object in the following order:

  • If the system has a digitizer integrated with the display device, this integrated digitizer is considered the default tablet, even if other digitizing tablets are installed.
  • If more than one digitizing tablet is installed in the system, the first one encountered during initialization is considered the default tablet.
  • If only one digitizing tablet is installed in the system, it is considered the default tablet.
  • If no digitizing tablets are installed in the system but there are other pointing devices (such as a mouse or a touch pad) installed that generate mouse messages, those devices in aggregate are considered to be the default tablet.
  • If no digitizing tablets and no pointing devices are installed in the system, no default tablet can be returned.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example returns a string that contains a report on the InkTablets collection, including the count of tablets, the name of the default tablet, and the tablets' supported properties.

Public Function ReportOnTablets() As String
    Dim theTablets As InkTablets
    Set theTablets = New InkTablets
    Dim theReport As String
    theReport = theReport & _
        "Ink reports the following tablet hardware:" & vbCrLf
    theReport = theReport & _
        "Count of available tablets: " & theTablets.Count & _
        vbCrLf
    theReport = theReport & "Default tablet name: " & _
        theTablets.DefaultTablet.Name & vbCrLf
    theReport = theReport & "Tablets IsPacketPropertySupported:" & vbCrLf
    If theTablets.IsPacketPropertySupported(AltitudeOrientation) Then
        theReport = theReport & "    AltitudeOrientation" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(AzimuthOrientation) Then
        theReport = theReport & "    AzimuthOrientation" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(ButtonPressure) Then
        theReport = theReport & "    ButtonPressure" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(NormalPressure) Then
        theReport = theReport & "    NormalPressure" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(PacketStatus) Then
        theReport = theReport & "    PacketStatus" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(PitchRotation) Then
        theReport = theReport & "    PitchRotation" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(RollRotation) Then
        theReport = theReport & "    RollRotation" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(SerialNumber) Then
        theReport = theReport & "    SerialNumber" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(TangentPressure) Then
        theReport = theReport & "    TangentPressure" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(TimerTick) Then
        theReport = theReport & "    TimerTick" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(TwistOrientation) Then
        theReport = theReport & "    TwistOrientation" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(X) Then
        theReport = theReport & "    X" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(XTiltOrientation) Then
        theReport = theReport & "    XTiltOrientation" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(Y) Then
        theReport = theReport & "    Y" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(YawRotation) Then
        theReport = theReport & "    YawRotation" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(YTiltOrientation) Then
        theReport = theReport & "    YTiltOrientation" & vbCrLf
    End If
    If theTablets.IsPacketPropertySupported(Z) Then
        theReport = theReport & "    Z" & vbCrLf
    End If
    ReportOnTablets = theReport
End Function

Applies To