मैं 60 का एक पूर्णांक मान के साथ एक lblCountdown है मैं सेकंड के साथ lblCountDown कमी के पूर्णांक मूल्य बनाना चाहते जब तक यह तक पहुँचता है 0.सेकंड उलटी गिनती टाइमर
यह वही है मैं अब तक है:
private int counter = 60;
private void button1_Click(object sender, EventArgs e)
{
int counter = 60;
timer1 = new Timer();
timer1.Tick += new EventHandler(timer1_Tick);
timer1.Interval = 1000; // 1 second
timer1.Start();
label1.Text = counter.ToString();
}
private void timer1_Tick(object sender, EventArgs e)
{
counter--;
if (counter == 0)
timer1.Stop();
label1.Text = counter.ToString();
}
pivate टाइमर timer1 के लिए स्वतंत्र महसूस मदद की ज़रूरत है काम किया? – Kade
आपको सार्वजनिक की जरूरत है? – Stecya
मुझे यकीन नहीं है कि मुझे अपने कोड – Kade