Button disable and enable

前端 未结 6 2430
北海茫月
北海茫月 2021-02-20 16:35

I have a vb.net based windows application, where when \"GO\" button is clicked a bunch of data is loaded into DB. So in my application as soon as \"GO\" button is clicked I want

6条回答
  •  别那么骄傲
    2021-02-20 17:11

    If your btnGo_Click() is ran inside main thread, UI could not be updated correctly inside a time-consuming task.
    The best way you can do what you need is running your method in a BackgroundWorker.

提交回复
热议问题