Is there some kind of boolean that I can use to check if the form instance is loaded, or else wait for the form to load?
eg:
While(form_loaded == false) { Try { //do something } catch { }//do try catch so code won't barf }
I get the following exception:
The first random error like "System.InvalidOperationException" occurred in System.Windows.Forms.dll
An unhandled exception of type "System.InvalidOperationException" occurred in System.Windows.Forms.dll
Additional Information: Invoke
or BeginInvoke
cannot be called in a control until a window handle is created.
This is what I'm worried about.
In addition, if a more detailed explanation is required, I can try to publish some code and / or additional information about debugging output.
source share