title: Using Async await in Windows Forms Load event to load other data controls?
body: <p>We have a Windows Forms <code>ParentForm</code> that opens <code>ChildForm</code>. Something like the following:</p>
  
  <pre><code>var form = new ChildForm(parm1, parm2, parm3, parm4);
  form.StartPosition = FormStartPosition.CenterParent;
  form.ShowDialog();
  </code></pre>
  
  <p>The constructor for <code>ChildForm</code> looks like this:</p>
  
  <pre><code>public ChildForm(string Parm1, string Parm2, string Parm3, string Parm4)
  {
      InitializeComponent();
  
      FillThisComboBox();
      FillThisOtherComboBox();
      BindAnotherCombobox();
      BindGridview();
      FillCheckBoxList();
      FillAnotherCheckBoxList();
  }
  </code></pre>
  
  <p>Unfortunately, <code>ChildForm</code> takes a while to load because it runs all those methods before actually drawing the Form.</p>
  
  <p>I would like to execute all these methods using <code>async await</code> so the Form is drawn while everything ekse runs, and I've tried something like the following, but I continue getting build errors:</p>
  
  <pre><code>private async void ChildForm_Load(object sender, EventArgs e)
  {
      await PrepareControls();
  }
  private async Task PrepareControls()
  {
      FillThisComboBox();
      FillThisOtherComboBox();
      BindAnotherCombobox();
      BindGridview();
      FillCheckBoxList();
      FillAnotherCheckBoxList();
  }
  </code></pre>
  
  <p>Any help is appreciated. Thanks.</p>