TreeNodeMouseClickEventArgs.Node プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TreeNodeMouseClickEventArgs.Node プロパティの意味・解説 

TreeNodeMouseClickEventArgs.Node プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

クリックされたノード取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Dim instance As TreeNodeMouseClickEventArgs
Dim value As TreeNode

value = instance.Node
public TreeNode Node { get; }
public:
property TreeNode^ Node {
    TreeNode^ get ();
}
/** @property */
public TreeNode get_Node ()

プロパティ
クリックされた TreeNode。

使用例使用例

TreeNodeMouseClickEventArgs イベント処理方法、および NodeMouseDoubleClick の使用方法次のコード例示します。この例を実行するには、treeView1 という名前の TreeView が配置されている Windows フォームに、次のコード貼り付けます。次にサンプル実行しているシステムc:\ ディレクトリにあるファイルの名前を持つノードtreeView1作成しtreeView1NodeMouseDoubleClick イベントを、この例の 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.");
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TreeNodeMouseClickEventArgs クラス
TreeNodeMouseClickEventArgs メンバ
System.Windows.Forms 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からTreeNodeMouseClickEventArgs.Node プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTreeNodeMouseClickEventArgs.Node プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTreeNodeMouseClickEventArgs.Node プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

TreeNodeMouseClickEventArgs.Node プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TreeNodeMouseClickEventArgs.Node プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS