while iam working with MDI form containing child forms when iam opening child forms it works fine and iam closing child form using X button again iam opening same form then i got exception :Cannot access a disposed how can i resolve it.
Object disposed exception.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


VulpesRank #55 · 29.2K reputationPosted Mar 19, 2015, 9:18 AM EDT
This can be done by handling the MDI child's FormClosing event as follows:
The form will still close, rather than hide, if it's closed for reasons other than user interaction.