A prompted error dialog box

tayhk

Newcomer
Joined
Nov 18, 2002
Messages
7
Whenever I switched from coding page to design page OR quit VB.Net program, there is an error dialog box prompted out with the message

The following exception has occurred :

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

What is that mean ? How to solve this ?

Any help with this question is greatly appreciated.
 
Hmm.. well. You can look inside your Task List and it'll have all of the errors in your project listed with a nice red ! next to them. You can double click the error messages and VB will automatically highlight the incorrect code for you. Also errors in your program will have blue squiggly lines undernearth them just like a word docement does to misspelled words.

If your Task List is not showing then go to View -> Other Windows -> Task List (or CTL+ALT+K).

Other then that I can't say much. My knowledge isn't to great for .NET yet so that error message is pretty criptic to me. :( Hopefully the Task List will help enough so you can at least get the code to paste that's giving the error so we can trouble shoot it.
 
If this is happening all the time, it may be a bug in vs.net. Make sure you have the latest service pack (2) and see if that helps.
 
I've had this happen to me. Apparently I was attempting to invoke a method of the Form class that can't be called until the window associated with the class is created. Of course this was a mistake on my part, but your error seems to be thrown from the IDE itself.
 
Back
Top