Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InvalidOperationException

Status
Not open for further replies.

anacris

Programmer
Oct 7, 2003
7
US
Hi,
I am getting the following error ocassionally in my windows forms app, it doesn't stop the app from running OK, but I want to know why is it happening and if I can fix it:

InvalidOperationException: Cannot call Invoke or InvokeAsync on a control
until the window handle has been created.

Thanks a lot,
Cristina
 
In visual studio you can make the application break into the debugger when a certain exception type occurs. Go to the Debug menu -> Exceptions. This way you can find out what lines of code are causing the exception.

Durkin
 
Durkin,
"In visual studio you can make the application break into the debugger when a certain exception type occurs. Go to the Debug menu -> Exceptions. This way you can find out what lines of code are causing the exception."

I think this only applies to runtime. This error occurs (for me at least) in design mode. The application runs perfectly, but sometimes when design changes are made my app produces this error.

anacris,
Did you ever find a solution to this?

James Goodman MCSE, MCDBA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top