How to report progress from within a class to a BackgroundWorker?

后端 未结 4 728
Happy的楠姐
Happy的楠姐 2020-12-09 11:31

My WinForm calls a class which performs some copying actions. I\'d like to show the progress of this on a form.

I\'d like to use the Backgroundworker, but I don\'t k

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 12:13

    It is done via the ReportProgress instance method of your current BackgroundWorker object. Your form must subscribe to the ProgressChanged event.

    MSDN has a small example here: http://msdn.microsoft.com/en-us/library/waw3xexc%28v=VS.100%29.aspx

提交回复
热议问题