次の方法で共有


RealTimeStylus.GetDesiredPacketDescription メソッド

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 を並べる方法を次に示します。

たとえば、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

参照

参照

RealTimeStylus クラス

RealTimeStylus メンバ

Microsoft.StylusInput 名前空間

RealTimeStylus.SetDesiredPacketDescription

Microsoft.Ink.PacketProperty