TreeNodeMouseClickEventArgs クラス
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


TreeNodeMouseClickEventArgs イベントの処理方法、および NodeMouseDoubleClick の使用方法を次のコード例に示します。この例を実行するには、treeView1 という名前の TreeView が配置されている Windows フォームに、次のコードを貼り付けます。次に、サンプルを実行しているシステムの c:\ ディレクトリにあるファイルの名前を持つノードを treeView1 に作成し、treeView1 の NodeMouseDoubleClick イベントを、この例の treeView1_NodeMouseDoubleClick メソッドに関連付けます。
' If a node is double-clicked, open the file indicated by the TreeNode. Sub treeView1_NodeMouseDoubleClick(ByVal sender As Object, _ ByVal e As TreeNodeMouseClickEventArgs) _ Handles treeView1.NodeMouseDoubleClick Try ' Look for a file extension, and open the file. If e.Node.Text.Contains(".") Then System.Diagnostics.Process.Start("c:\" + e.Node.Text) End If ' If the file is not found, handle the exception and inform the user. Catch MessageBox.Show("File not found.") End Try End Sub 'treeView1_NodeMouseDoubleClick
// If a node is double-clicked, open the file indicated by the TreeNode. void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { try { // Look for a file extension. if (e.Node.Text.Contains(".")) System.Diagnostics.Process.Start(@"c:\" + e.Node.Text); } // If the file is not found, handle the exception and inform the user. catch (System.ComponentModel.Win32Exception) { MessageBox.Show("File not found."); } }
// If a node is double-clicked, open the file indicated by the TreeNode. private: void InitialTreeView_NodeMouseDoubleClick(Object^ sender, TreeNodeMouseClickEventArgs^ e) { try { // Look for a file extension. if (e->Node->Text->Contains(".")) { System::Diagnostics::Process::Start("c:\\" + e->Node->Text); } } // If the file is not found, handle the exception and inform the user. catch (System::ComponentModel::Win32Exception^) { MessageBox::Show("File not found."); } }

System.EventArgs
System.Windows.Forms.MouseEventArgs
System.Windows.Forms.TreeNodeMouseClickEventArgs


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


TreeNodeMouseClickEventArgs コンストラクタ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Public Sub New ( _ node As TreeNode, _ button As MouseButtons, _ clicks As Integer, _ x As Integer, _ y As Integer _ )
Dim node As TreeNode Dim button As MouseButtons Dim clicks As Integer Dim x As Integer Dim y As Integer Dim instance As New TreeNodeMouseClickEventArgs(node, button, clicks, x, y)
public: TreeNodeMouseClickEventArgs ( TreeNode^ node, MouseButtons button, int clicks, int x, int y )
public function TreeNodeMouseClickEventArgs ( node : TreeNode, button : MouseButtons, clicks : int, x : int, y : int )

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


TreeNodeMouseClickEventArgs プロパティ

名前 | 説明 | |
---|---|---|
![]() | Button | マウスのどのボタンが押されたかを示す値を取得します。 ( MouseEventArgs から継承されます。) |
![]() | Clicks | マウス ボタンが押されて離された回数を取得します。 ( MouseEventArgs から継承されます。) |
![]() | Delta | マウス ホイールの回転回数を表す符合付きの数値を取得します。マウス ホイールのノッチ 1 つ分が 1 移動量に相当します。 ( MouseEventArgs から継承されます。) |
![]() | Location | マウス イベント生成時のマウスの位置を取得します。 ( MouseEventArgs から継承されます。) |
![]() | Node | クリックされたノードを取得します。 |
![]() | X | マウス イベント生成時のマウスの x 座標を取得します。 ( MouseEventArgs から継承されます。) |
![]() | Y | マウス イベント生成時のマウスの y 座標を取得します。 ( MouseEventArgs から継承されます。) |

TreeNodeMouseClickEventArgs メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

TreeNodeMouseClickEventArgs メンバ
NodeMouseClick イベントと NodeMouseDoubleClick イベントのデータを提供します。
TreeNodeMouseClickEventArgs データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Button | マウスのどのボタンが押されたかを示す値を取得します。(MouseEventArgs から継承されます。) |
![]() | Clicks | マウス ボタンが押されて離された回数を取得します。(MouseEventArgs から継承されます。) |
![]() | Delta | マウス ホイールの回転回数を表す符合付きの数値を取得します。マウス ホイールのノッチ 1 つ分が 1 移動量に相当します。(MouseEventArgs から継承されます。) |
![]() | Location | マウス イベント生成時のマウスの位置を取得します。(MouseEventArgs から継承されます。) |
![]() | Node | クリックされたノードを取得します。 |
![]() | X | マウス イベント生成時のマウスの x 座標を取得します。(MouseEventArgs から継承されます。) |
![]() | Y | マウス イベント生成時のマウスの y 座標を取得します。(MouseEventArgs から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

Weblioに収録されているすべての辞書からTreeNodeMouseClickEventArgsを検索する場合は、下記のリンクをクリックしてください。

- TreeNodeMouseClickEventArgsのページへのリンク