TreeView.NodeMouseDoubleClick イベントとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TreeView.NodeMouseDoubleClick イベントの意味・解説 

TreeView.NodeMouseDoubleClick イベント

メモ : このイベントは、.NET Framework version 2.0新しく追加されたものです。

ユーザーマウスで TreeNode をダブルクリックしたときに発生します

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

Public Event NodeMouseDoubleClick As
 TreeNodeMouseClickEventHandler
Dim instance As TreeView
Dim handler As TreeNodeMouseClickEventHandler

AddHandler instance.NodeMouseDoubleClick, handler
public event TreeNodeMouseClickEventHandler NodeMouseDoubleClick
public:
event TreeNodeMouseClickEventHandler^ NodeMouseDoubleClick {
    void add (TreeNodeMouseClickEventHandler^ value);
    void remove (TreeNodeMouseClickEventHandler^ value);
}
/** @event */
public void add_NodeMouseDoubleClick (TreeNodeMouseClickEventHandler
 value)

/** @event */
public void remove_NodeMouseDoubleClick (TreeNodeMouseClickEventHandler
 value)
JScript では、イベント使用できますが、新規に宣言することはできません。
解説解説
使用例使用例

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.");
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

TreeView.NodeMouseDoubleClick イベントのお隣キーワード
検索ランキング

   

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



TreeView.NodeMouseDoubleClick イベントのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS