System.ObjectDisposedException

  • Thread starter Thread starter KV
  • Start date Start date
K

KV

In my application, I had created a library that includes a form, in the main
App, it calls the lib and that form will be shown.everytime run to here,
error promate: error: System.ObjectDisposedException.
 
Are you calling the form with ShowDialog? If so this disposes the form after
it is dismissed and so is only good for one showing. You could either
recreate a new instance of the same form each time, or use Show instead.

Peter
 
In that case where is the form instance declared in the class library such
that it doesn't go out of scope between calls from your application?

Peter
 

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

Back
Top