who can help??
I want display window form when user double click node in treeview.
Handle the DoubelClick method and open your form.
Handle the DoubelClick method and open your form.
can give example code?
private void treeView1_DoubleClick(object sender, EventArgs e) {
TreeNode tn = (TreeNode)sender;
Form1 frm = new Form1(tn.Text);
frm.Show();
}
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
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.
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");
}
Did you attach the method to the DoubleClick event of the TreeView control?
Did you attach the method to the DoubleClick event of the TreeView control?
what the code of doubleclick method
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.