InkPicture.SystemGesture イベント
システム ジェスチャが認識されたときに発生します。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Event SystemGesture As InkCollectorSystemGestureEventHandler
'使用
Dim instance As InkPicture
Dim handler As InkCollectorSystemGestureEventHandler
AddHandler instance.SystemGesture, handler
public event InkCollectorSystemGestureEventHandler SystemGesture
public:
event InkCollectorSystemGestureEventHandler^ SystemGesture {
void add (InkCollectorSystemGestureEventHandler^ value);
void remove (InkCollectorSystemGestureEventHandler^ value);
}
/** @event */
public void add_SystemGesture (InkCollectorSystemGestureEventHandler value)
/** @event */
public void remove_SystemGesture (InkCollectorSystemGestureEventHandler value)
JScript では、イベントは使用できません。
解説
システム ジェスチャにより、ジェスチャの作成に使用される Cursor オブジェクトに関する情報を得ることができます。システム ジェスチャにはまた、マウス イベントおよびマウス イベントを検出する有効な方法を組み合わせたショートカットが用意されています。
たとえば、他のマウス イベントが間で発生していない MouseUp と MouseDown の 1 組をリッスンする代わりに、Tap システム ジェスチャまたは RightTap システム ジェスチャをリッスンできます。
別の例として、MouseDown イベントと MouseMove イベントをリッスンして多数の MouseMove メッセージを取得する代わりに、すべてのマウスの位置の (x、y) 座標が必要ないのであれば、Drag システム ジェスチャまたは RightDrag システム ジェスチャをリッスンできます。これにより、多数の MouseMove メッセージを受信する代わりに 1 つのメッセージだけを受信するようになります。
特定のシステム ジェスチャについては、SystemGesture 列挙型を参照してください。システム ジェスチャの詳細については、「Using Gestures」および「Command Input on the Tablet PC」を参照してください。
イベント ハンドラは、このイベントについてのデータを格納している InkCollectorSystemGestureEventArgs 型の引数を受け取ります。
InkCollectorSystemGestureEventHandler デリゲートを作成する場合は、イベントを処理するメソッドを指定します。イベントをイベント ハンドラに関連付けるには、デリゲートのインスタンスをイベントに追加します。デリゲートを削除しない限り、そのイベントが発生すると常にイベント ハンドラが呼び出されます。
例
この例では、イベント ハンドラによって、システム ジェスチャ情報がステータス バー ラベル statusLabelSysGesture に表示されます。
Private Sub Event_OnSystemGesture(ByVal sender As Object, ByVal e As InkCollectorSystemGestureEventArgs)
Select Case e.Id
Case SystemGesture.Tap
Me.statusLabelSysGesture.Text = "Tap"
Case SystemGesture.DoubleTap
Me.statusLabelSysGesture.Text = "Double Tap"
End Select
End Sub
private void Event_OnSystemGesture(object sender, InkCollectorSystemGestureEventArgs e)
{
switch (e.Id)
{
case SystemGesture.Tap:
this.statusLabelSysGesture.Text = "Tap";
break;
case SystemGesture.DoubleTap:
this.statusLabelSysGesture.Text = "Double Tap";
break;
}
}
システム ジェスチャの収集の前に、InkPicture オブジェクト mInkPicture がイベント ハンドラを登録します。
' register the SystemGesture event handler
AddHandler mInkPicture.SystemGesture, New InkCollectorSystemGestureEventHandler(AddressOf Event_OnSystemGesture)
// register the SystemGesture event handler
mInkPicture.SystemGesture += new InkCollectorSystemGestureEventHandler(Event_OnSystemGesture);
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0
参照
参照
InkCollectorSystemGestureEventArgs