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?
 
Back
Top