InkCollector.Tablet - свойство
Обновлен: Ноябрь 2007
Gets the tablet device that the InkCollector object is currently using to collect input.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public ReadOnly Property Tablet As Tablet
'Применение
Dim instance As InkCollector
Dim value As Tablet
value = instance.Tablet
public Tablet Tablet { get; }
public:
property Tablet^ Tablet {
Tablet^ get ();
}
/** @property */
public Tablet get_Tablet()
public function get Tablet () : Tablet
Значение свойства
Тип: Microsoft.Ink.Tablet
The tablet device that the InkCollector object is currently using to collect input.
Заметки
Примечание. |
---|
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 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
См. также
Ссылки
Microsoft.Ink - пространство имен