Problem with Invalid Cast Exception

  • Thread starter Thread starter Atley
  • Start date Start date
A

Atley

I occasionally get an Invalid Cast Exception error when closing one form
after opening another. It only seems to happen when I try to use the
application quickly, clicking on one menu item before everything is redrawn
to the screen.

Is there any wy around this, to ensure that it never happens?
 
Are you using Application.DoEvents() in your form load method?
Are you doing something similar with threading?
I have seen similar behavior in these kind of cases.

Thanks,
Chris Craft
http://www.cjcraft.com/
 
I do have application.doevents in the load of a couple of forms, but if i do
not, the forms appear in a horrible chopped up way, is there a way to have
it all?
 

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