I have a ComboBox with several elements. I want to put SelectedIndexComboBox on 0, so when the user starts it, the first element is already selected (by default).
However, executing this ( combobox.SelectedIndex = 0;) interferes with my event combobox_SelectedIndexChanged(), which occurs when the user changes SelectedIndex from ComboBox, reloading the program:
private void combobox_SelectedIndexChanged(object sender, EventArgs e)
{
Process.Start(Application.ExecutablePath);
this.Close();
}
This will lead to an infinite t23 loop, since it combobox.SelectedIndex = 0;will call it, which will again call another, etc ...
Is there a way for the program to be able to do something when the user changes SelectedIndex without this loop?