What is the best way to update form controls from a worker thread?

前端 未结 4 1514
醉酒成梦
醉酒成梦 2020-12-18 04:47

I\'ve done some research and I can\'t really find a preferred way to do updating of form controls from a worker thread in C#. I know about the BackgroundWorker component, b

4条回答
  •  不知归路
    2020-12-18 05:21

    Why dont you want to do it using the BackgroundWorker? It has a fantastic callback event called ProgressChanged which lets the UI thread know about updates, perfect for progess bar-type updates and the like.

    link to details

提交回复
热议问题