2
Contributors
8
Replies
20
Views
6 Years
Discussion Span
Last Post by lianpiau
0

Handle the DoubelClick method and open your form.

can give example code?

0
private void treeView1_DoubleClick(object sender, EventArgs e) {
    TreeNode tn = (TreeNode)sender;

    Form1 frm = new Form1(tn.Text);
    frm.Show();
}
0
private void treeView1_DoubleClick(object sender, EventArgs e) {
    TreeNode tn = (TreeNode)sender;

    Form1 frm = new Form1(tn.Text);
    frm.Show();
}

no work.

it display error "WindowsFormApplication1.Admin.ChangePassword" does not contain a constructor that take '1' arguments

0

You asked for an example, not a full working project that solves your problem. I don't know anything about what you are doing other than you want to open a form when you double click on a treeview node. I don't know what your form is doing, what it needs, or why you want to do it.

YOU will have to figure out how to get your form to work. Everything you need is there or in the error message the system told you.

0

You asked for an example, not a full working project that solves your problem. I don't know anything about what you are doing other than you want to open a form when you double click on a treeview node. I don't know what your form is doing, what it needs, or why you want to do it.

YOU will have to figure out how to get your form to work. Everything you need is there or in the error message the system told you.

the problem is double click event not response

for exmple:
this code will not show messagebox

Private void treeView1_DoubleClick(object sender, EventArds e)
{
    MessageBox.Show("123");
}
0

Did you attach the method to the DoubleClick event of the TreeView control?

what the code of doubleclick method

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.