Share via


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 ();
}
public function get DefaultTablet () : Tablet

Property Value

Type: Microsoft.Ink.Tablet
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.

Examples

This example obtains the default tablet of the Tablets collection, and generates a report string that shows the default tablet name, and whether or not the tablet digitizer is integrated with the display.

Public Function Report_DefaultTablet() As String 

    Dim SB As StringBuilder = New StringBuilder(1024)

    Dim defTablet As Tablet = New Tablets().DefaultTablet
    SB.AppendLine("Default tablet")
    SB.AppendLine("Name: " + defTablet.Name)

    If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.Integrated) > 0 Then
        SB.AppendLine("Integrated: YES")
    Else
        SB.AppendLine("Integrated: NO")
    End If 

    Return SB.ToString()
End Function
public string Report_DefaultTablet()
{
    StringBuilder SB = new StringBuilder(1024);
    Tablet defTablet = new Tablets().DefaultTablet;
    SB.AppendLine("Default tablet");
    SB.AppendLine("Name: " + defTablet.Name);
    SB.AppendLine("Integrated: " +
        (((defTablet.HardwareCapabilities & TabletHardwareCapabilities.Integrated) > 0) ? "YES" : "NO"));
    return SB.ToString();

}

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Tablets Class

Tablets Members

Microsoft.Ink Namespace

Tablet