Reputation: 38573
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.
Upvotes: 1
Views: 436
Reputation: 29073
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.
Upvotes: 1