You are viewing our Forum Archives. To view or take place in current topics click here.
Minor help with C# +rep [Solved]
Posted:

Minor help with C# +rep [Solved]Posted:

xChillest
  • Christmas!
Status: Offline
Joined: Jul 30, 201211Year Member
Posts: 2,396
Reputation Power: 123
Status: Offline
Joined: Jul 30, 201211Year Member
Posts: 2,396
Reputation Power: 123
Need a little bit of help with C#...

Say I have 4 items in one combo box, and I want each item to open a different form.
I have 5 different items in the comboBox, but I want each item when selected and the big button is pressed to open a different form. I have the forms set up, and I know how to open each one, but I'm not sure how to open the one listed in the combo box.

It seemed really easy at first, then I just forgot what to do there
Any help is appreciated, and will +50 rep to the first answer

EDIT: Picture to kind of explain what I mean
[ Register or Signin to view external links. ]

EDIT2: Got it solved late last night thanks to Crimson_Mods, but thanks for the help anyways


Last edited by xChillest ; edited 1 time in total
#2. Posted:
XeFreeze
  • Junior Member
Status: Offline
Joined: Nov 27, 201310Year Member
Posts: 97
Reputation Power: 3
Status: Offline
Joined: Nov 27, 201310Year Member
Posts: 97
Reputation Power: 3
Form1 yourint = new Form1();
yourint.Show();
#3. Posted:
iTzZ_SpK
  • New Member
Status: Offline
Joined: Apr 09, 201410Year Member
Posts: 13
Reputation Power: 0
Status: Offline
Joined: Apr 09, 201410Year Member
Posts: 13
Reputation Power: 0
try:

if (comboBox1.Text == "Modern Warfare 2")
{
new Form1().Show();
}
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.