Updating UI controls from a Background Thread
I have a GUI program that runs on a Windows CE 2.0 Device. At one point I need to do a remote request to a Web Server that I want to do in a background Thread, the problem is that I also need to update a progress bar and a button's 'Enabled' property while 开发者_开发问答this process is going on.
BackgroundWorker() is not available for some reason (it is greyed out). How do I start a background thread and update UI controls from this Thread.
Use the Invoke method on the UI control to update it from a background thread.
See ThreadStart for the old way of doing things on background threads.
精彩评论