Поделиться через


InkOverlay.Tablet - свойство

Обновлен: Ноябрь 2007

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

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
<BrowsableAttribute(False)> _
Public ReadOnly Property Tablet As Tablet
'Применение
Dim instance As InkOverlay
Dim value As Tablet

value = instance.Tablet
[BrowsableAttribute(false)]
public Tablet Tablet { get; }
[BrowsableAttribute(false)]
public:
property Tablet^ Tablet {
    Tablet^ get ();
}
/** @property */
/** @attribute BrowsableAttribute(false) */
public Tablet get_Tablet()
public function get Tablet () : Tablet

Значение свойства

Тип: Microsoft.Ink.Tablet
The tablet device that the InkOverlay object is currently using to collect input.

Заметки

ms582179.alert_note(ru-ru,VS.90).gifПримечание.

This property is valid only when the InkOverlay is collecting ink from just one tablet. Accessing this property for an InkOverlay 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 InkOverlay object, mInkObject.

Public Function InkObjectTabletReport() As String
    Dim Result As StringBuilder = 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 mInkObject has the following properties:")
        ' accessing mInkObject.Tablet will throw an exception if in All Tablets mode
        ' mInkObject can be InkCollector, InkOverlay, or InkPicture
        Dim mTablet As Tablet = 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 ex As System.Exception
        Result.AppendLine("mInkObject is in all tablets mode.")
        Result.AppendLine("The tablet report cannot be generated.")
    End Try

    Return Result.ToString()
End Function
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 Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

InkOverlay Класс

InkOverlay - члены

Microsoft.Ink - пространство имен

Tablet

InkOverlay.SetAllTabletsMode

InkOverlay.SetSingleTabletIntegratedMode