Error Unloading Form

W

Wittaya

I am using command Me.Closed()in Event of TreeView
AfterSelect.

This below is Error Message appear.

An unhandled exception of type 'System Object Disposed
Exception' occured in system.windows.forms.dll

Additonal Information : Cannot access a disposed object
named "Treeview".
 
A

Armin Zingler

Wittaya said:
I am using command Me.Closed()in Event of TreeView
AfterSelect.

This below is Error Message appear.

An unhandled exception of type 'System Object Disposed
Exception' occured in system.windows.forms.dll

Additonal Information : Cannot access a disposed object
named "Treeview".

I think I remember reading a solution that enabled a timer, fired directly
after the AfterSelect event because you can not close the form in this event
handler (and in other handlers). In the timer's tick event, Me.Close is
called.
 
C

Cor

Herfried,
I thought of that when I had sended it, and then you cannot correct it and
did not know how to correct it and then I saw the message from Armin and
thougth what can I do more.
:)
Cor.
 
H

Herfried K. Wagner [MVP]

Cor said:
I thought of that when I had sended it, and then you cannot correct it and
did not know how to correct it and then I saw the message from Armin and
thougth what can I do more.

ROFL again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top