V
Vitaly Sedov
Hi All!
I have an application that opens form with TreeView.
I want to close form by AfterSelect Event:
private void MyTreeView_AfterSelect(object sender,
System.Windows.Forms.TreeViewEventArgs e)
{
this.Close();
}
But everytime when I clicking on TreeView Item,
I get following error:
An unhandled exception of type 'System.ObjectDisposedException' occurred in
system.windows.forms.dll
Additional information: Cannot access a disposed object named "TreeView".
Any ideas?
Thank you,
Vitaly Sedov
I have an application that opens form with TreeView.
I want to close form by AfterSelect Event:
private void MyTreeView_AfterSelect(object sender,
System.Windows.Forms.TreeViewEventArgs e)
{
this.Close();
}
But everytime when I clicking on TreeView Item,
I get following error:
An unhandled exception of type 'System.ObjectDisposedException' occurred in
system.windows.forms.dll
Additional information: Cannot access a disposed object named "TreeView".
Any ideas?
Thank you,
Vitaly Sedov