This topic has not yet been rated - Rate this topic

InkCollector.Tablet Property

Gets the tablet device that the InkCollector object is currently using to collect input.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)
public Tablet Tablet { get; }

Property Value

Type: Microsoft.Ink.Tablet
The tablet device that the InkCollector object is currently using to collect input.
NoteNote:

This property is valid only when the InkCollector is collecting ink from just one tablet. Accessing this property for an InkCollector that is collecting ink from more than one tablet generates an exception.

This example returns a report on the properties of the Tablet object referenced by the InkCollector object, mInkObject.

public string InkObjectTabletReport()
{
    StringBuilder Result = new StringBuilder(512);

    // Wrap access to the Tablet object in a try/catch block.  
    // If mInkObject is in All Tablets mode, an exception will be  
    // thrown when accessing the Tablet property. 
    try
    {
        Result.AppendLine("The  tablet associated with mInkObject has the following properties:");
        // accessing mInkObject.Tablet will throw an exception if in All Tablets mode 
        // mInkObject can be InkCollector, InkOverlay, or InkPicture
        Tablet mTablet = mInkObject.Tablet;
        Result.AppendLine("Tablet Name: " + mTablet.Name);
        Result.AppendLine("Tablet PNP ID: " + mTablet.PlugAndPlayId);
        Result.AppendLine("Tablet Max Rect: " + mTablet.MaximumInputRectangle.ToString());
        Result.AppendLine("Tablet Capabilities: " + mTablet.HardwareCapabilities);
    }
    catch (System.Exception)
    {
        Result.AppendLine("mInkObject is in all tablets mode.");
        Result.AppendLine("The tablet report cannot be generated.");
    }

    return Result.ToString();
}

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.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.