[Solved] Run progress bar until being logged in, because sometimes internet speed is slow and some times it is fast. (C#, Windows Form Application) [closed]


    private async void button1_Click(object sender, EventArgs e)
    {
        await TimeConsumingOperation();
    }

    public async Task TimeConsumingOperation()
    {
        progressBar1.Visible = true;
        progressBar1.Style = ProgressBarStyle.Marquee;
        await Task.Delay(10000);
        progressBar1.Visible = false;
    }

1

solved Run progress bar until being logged in, because sometimes internet speed is slow and some times it is fast. (C#, Windows Form Application) [closed]