Hi guys. I have this ComboBox which I made :

http://i.imgur.com/kkB8T.png


I want to reference each item from the combo to a win form .


So far Ive this :


string comboSelectedValue = comboBox1.SelectedItem.ToString();
MessageBox.Show(comboSelectedValue);

It does display of course the value Ive chosen but thats not what I want :P
Appreciate your help

Thanks guys, Ive figured out how to solve this.

EDIT:

solution:

    public void button1_Click(object sender, EventArgs e)
        {

//create an object from the class you want ( as usual)

     Vbulletin objx = new Vbulletin();

// as usual use the object name +show syntax
            objx.Show();
}


  public void comboBox1_SelectedIndexChanged(object sender, EventArgs e)

{

// declare a string field

 string txt;

//define what the string is gonna hold & cast the value 


            txt = comboBox1.SelectedItem.ToString();
            comboBox1.SelectedIndex = 1;

}

Edited 3 Years Ago by pyTony: fixed formatting

This question has already been answered. Start a new discussion instead.