You try to handle the
private ComboBox TimeIntervel;
but instead you have created another one, and the
TimeIntervel
is not populated. Rename the
TimeIntervel
to
TimeIntervelCMB
private ComboBox TimeIntervelCMB;
int Stimer;
public void set control()
{
ComboBox TimeIntervelCmb = new ComboBox();
TimeIntervelCmb.Location = new Point(50,70);
TimeIntervelCmb.Name = "ComboBoxTime";
TimeIntervelCmb.Size = new Size(80, 100);
TimeIntervelCmb.Items.AddRange({500,1000,2000,3000,4000,5000,6000});