I have items in a combo box. When I selected the item, the timer interval must be multiplied by the number selected in the combo box. But when run the code it says "System.ArgumentOutOfRangeException: 'Value '0' is not a valid value for Interval. Interval must be greater than 0." the items in the combo box are 1,2,4,8,10 and 20.
the code is below
int x1;
private int ch1xscale()
{
x1 = Convert.ToInt32(cmbch1.SelectedItem);
return x1;
}
timer1.Tick += Timer1_Tick;
timer1.Interval = 100*ch1xscale();
cmbch1.SelectedIndex = 3;
what is wrong here ?