I have the following code:
public async void startCountdown()
{
do
{
label9.Text = frsL.ToString();
frsL -= frsLStep;
g = tabPage1.CreateGraphics();
g.DrawLine(pen1, 5, 7, (int)frsL + 5, 7);
await Task.Delay(1000);
} while (timeToSeconds());
}
I'm trying to refresh a progress line every second, but the line isn't changing. I used label9 just to check if frsL
value is changing and it is, but the line isn't redrawn and it stays at it's starting length.