RealTimeStylus オブジェクトが関連するタブレット コンテキストで収集される、パケットを示す値の配列を返します。
名前空間 : Microsoft.StylusInput
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Function GetDesiredPacketDescription As Guid()
'使用
Dim instance As RealTimeStylus
Dim returnValue As Guid()
returnValue = instance.GetDesiredPacketDescription()
public Guid[] GetDesiredPacketDescription()
public:
array<Guid>^ GetDesiredPacketDescription()
public Guid[] GetDesiredPacketDescription()
public function GetDesiredPacketDescription() : Guid[]
戻り値
型 : array<System.Guid[]
RealTimeStylus オブジェクトが関連するパケット プロパティのグローバル一意識別子 (GUID) を返します。
解説
このメソッドを使用して、RealTimeStylus オブジェクトが関連するパケット プロパティの配列を取得します。パケット プロパティは GUID の配列によって表されます。PacketProperty オブジェクトは標準のパケット プロパティ GUID を定義しますが、他の GUID を使用することもできます。
RealTimeStylus オブジェクトがタブレットからインクを収集する場合、RealTimeStylus オブジェクトは、関連を設定していて (GetDesiredPacketDescription メソッドの戻り値として表されます)、インクを収集しているタブレットによってサポートされるパケット プロパティについてのみパケット データを返します。インク データを RealTimeStylus オブジェクトによって処理する方法の詳細については、「Ink-Collection Plug-ins」を参照してください。
SetDesiredPacketDescription メソッドを呼び出すことができるのは、RealTimeStylus オブジェクトが無効なときだけです。ただし、SetDesiredPacketDescription メソッドの呼び出しは、GetDesiredPacketDescription メソッドの戻り値に直ちに反映されます。
RealTimeStylus オブジェクトがパケット プロパティ GUID を並べる方法を次に示します。
PacketProperty.X GUID と PacketProperty.Y GUID は、SetDesiredPacketDescription メソッドの前の呼び出しで指定されていたかどうかに関係なく、GetDesiredPacketDescription メソッドによって常に配列の最初の 2 つの位置で返されます。
PacketProperty.PacketStatus GUID が SetDesiredPacketDescription メソッドの呼び出しで指定されている場合、PacketProperty.PacketStatus GUID は GetDesiredPacketDescription メソッドによって常に配列の最後の位置で返されます。
SetDesiredPacketDescription メソッドの呼び出しで複数回指定されている GUID があっても、各 GUID は GetDesiredPacketDescription メソッドによって返される配列に 1 回しか出現しません。
既定では、GetDesiredPacketDescription メソッドは PacketProperty.X、PacketProperty.Y、および PacketProperty.NormalPressure GUID を返します。
たとえば、SetDesiredPacketDescription メソッドで (a, b, a, PacketStatus, b, c, d) を指定して呼び出すと、GetDesiredPacketDescription メソッド呼び出しは (X, Y, a, b, c, d, PacketStatus) を返します。
例
この C# の例は、メニュー項目の Click イベント ハンドラのスニペットです。このメニューは、TextBox オブジェクト theTextBox が定義されているフォームの一部です。イベント ハンドラは RealTimeStylus オブジェクトの GetDesiredPacketDescription メソッドを呼び出します。
using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;
// ...
// Declare the RealTimeStylus objects, the GestureRecognizer plugin,
// and the DynamicRenderer plug-in.
private Microsoft.StylusInput.RealTimeStylus thePrimaryRealTimeStylus = null;
private Microsoft.StylusInput.RealTimeStylus theSecondaryRealTimeStylus = null;
private Microsoft.StylusInput.GestureRecognizer theGestureRecognizer = null;
private Microsoft.StylusInput.DynamicRenderer theDynamicRenderer = null;
// ...
// The GetDesiredPacketDescription menu item's ClickEventHandler
private void theMenuItemGetDesiredPacketDescription_Click(object sender,
System.EventArgs e)
{
this.theTextBox.Text = "DesiredPacketDescription = " + Environment.NewLine;
foreach (Guid theGuid in this.thePrimaryRealTimeStylus.GetDesiredPacketDescription())
{
this.theTextBox.Text += string.Format(" {0}" + Environment.NewLine,
this.GetPacketPropertyNameFromGuid(theGuid));
}
}
プラットフォーム
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0