progress bar not progressing

前端 未结 4 1409
青春惊慌失措
青春惊慌失措 2021-01-28 07:17

I have a program which is updating a table in sqlserver, I have a form which I want to show the progress of this, the progress bar is incrementing but this is not being displaye

4条回答
  •  孤城傲影
    2021-01-28 07:31

    yes you have to use background worker

    BackgroundWorker worker = new BackgroundWorker();
        worker.DoWork += (o, ea) =>
        {
         // your code goes here
           }
     worker.RunWorkerCompleted += (q, ea) =>
        {
          }
     worker.RunWorkerAsync();
    

提交回复
热议问题