Compartir a través de


Tablets.DefaultTablet Property

Gets the default Tablet object of the Tablets collection.

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

Syntax

'Declaration
Public ReadOnly Property DefaultTablet As Tablet
'Usage
Dim instance As Tablets
Dim value As Tablet

value = instance.DefaultTablet
public Tablet DefaultTablet { get; }
public:
property Tablet^ DefaultTablet {
    Tablet^ get ();
}
/** @property */
public Tablet get_DefaultTablet ()
public function get DefaultTablet () : Tablet
Not applicable.

Property Value

The default Tablet object of the Tablets collection.

Remarks

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

  1. 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.

  2. If more than one digitizing tablet is installed in the system, the first one encountered during initialization is considered the default tablet.

  3. If only one digitizing tablet is installed in the system, it is considered the default tablet.

  4. 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, an exception is thrown.

Example

This C# example returns a string that contains a report on the Tablets collection, theTablets, including the count of tablets, the name of the default tablet, and the tablets' supported properties.

using System.Text;  // For StringBuilder support
using Microsoft.Ink;
// . . .
public string ReportOnTablets()
{
    Tablets theTablets = new Tablets();
    StringBuilder theReport = new StringBuilder();
    theReport.Append("Ink reports the following tablet hardware:" + Environment.NewLine);
    theReport.Append("Count of available tablets: " + theTablets.Count + "" + Environment.NewLine);
    theReport.Append("Default tablet name: " + theTablets.DefaultTablet.Name + "" + Environment.NewLine);
    theReport.Append("Tablets IsPacketPropertySupported: " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.AltitudeOrientation))
        theReport.Append("    AltitudeOrientation " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.AzimuthOrientation))
        theReport.Append("    AzimuthOrientation " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.ButtonPressure))
        theReport.Append("    ButtonPressure " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.NormalPressure))
        theReport.Append("    NormalPressure " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.PacketStatus))
        theReport.Append("    PacketStatus " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.PitchRotation))
        theReport.Append("    PitchRotation " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.RollRotation))
        theReport.Append("    RollRotation " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.SerialNumber))
        theReport.Append("    SerialNumber " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.TangentPressure))
        theReport.Append("    TangentPressure " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.TimerTick))
        theReport.Append("    TimerTick " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.TwistOrientation))
        theReport.Append("    TwistOrientation " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.X))
        theReport.Append("    X " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.XTiltOrientation))
        theReport.Append("    XTiltOrientation " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.Y))
        theReport.Append("    Y " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.YawRotation))
        theReport.Append("    YawRotation " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.YTiltOrientation))
        theReport.Append("    YTiltOrientation " + Environment.NewLine);
    if (theTablets.IsPacketPropertySupported(PacketProperty.Z))
        theReport.Append("    Z " + Environment.NewLine);
    return theReport.ToString();
}

This Microsoft® Visual Basic® .NET example returns a string that contains a report on the Tablets collection, theTablets, including the count of tablets, the name of the default tablet, and the tablets' supported properties.

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

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

Tablets Class
Tablets Members
Microsoft.Ink Namespace
Tablet