Guest User

Untitled

a guest
May 16th, 2012
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  private void LoadPlanetList()
  2.         {
  3.             if (this.comboBoxPlanetList.InvokeRequired)
  4.             {
  5.                 MessageBox.Show("invoke required");
  6.             }
  7.             else
  8.             {
  9.                 comboBoxPlanetList.ValueMember = "Key";
  10.                 comboBoxPlanetList.DisplayMember = "Value";
  11.                 comboBoxPlanetList.DataSource = new BindingSource(PlanetList, null);
  12.             }
  13.         }
  14. //this line causes a threading error without the if statement.
  15. comboBoxPlanetList.ValueMember = "Key";
  16. fi
Advertisement
Add Comment
Please, Sign In to add comment