Since DropDownList does not have the Focused property, as well as for controlling ComboBox in WinForms , it is not so simple. One way is to add a custom flag and change its value before changing the SelectedIndex property. Inside the event handler, you can check this flag and reset its value:
private volatile bool isAutoFired = false;
Then somewhere in the code:
isAutoFired = true; cbo.SelectedIndex = placering; private void cbo_SelectedIndexChanged(object sender, EventArgs e) { if(!isAutoFired) {
source share