Question: Is there some sort of boolean that I can use to check whether the instance of a form is loaded, or otherwise wait until the form is loaded?

for example:

```
While(form_loaded == false) {
  Try {
    //do something
  }
  catch {
  }//do try catch so code won't barf
}

```

I keep getting the following exception:

> 
> A first chance exception of type '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 on a control until the window handle has been created.
> 
> 
> 

This is what I am worrying about.

Additionally if a more detailed explanation is needed I can try to post some code and/or some more output debugging information.

Answer: 
try to use the shown event something like this 

```
 public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
        this.Shown += new System.EventHandler(this.Form1_Shown);
    }

    private void Form1_Shown(object sender, EventArgs e)
    {

    }
}

```

hope this help
You have a `Loaded` and a `Shown` event to pick from. 

Windows is event driven so never wait for something in a loop.