I have a timer in My win app.
The timer interval is 3 seconds and deletes one item from listbox.
Here is the code:
private void timer3_Tick(object sender, EventArgs e)
{
timer3.Enabled = false;
if (listBox1.Items.Count > 0)
{
listBox1.Items.RemoveAt(0);
progressBar1.Increment(1);
groupBox2.Text = listBox1.Items.Count.ToString();
timer3.Enabled = true;
}
}
I want a message box to show that "listBox1 is clear" when listBox1.Items.Count == 0
thank you