4

Is only the UI-thread able to display to the screen, or can other threads do this as well?

richard
  • 12,263
  • 23
  • 95
  • 151

3 Answers3

7

No you can only access to UI directly from the UI thread but you can marshal the results from other threads, such as using the Control.Invoke or control.BegineInvoke/EndInvoke

Check this out

Phil Murray
  • 6,396
  • 9
  • 45
  • 95
1

You can use the BeginInvoke() member of all GUI controls to change the values of their properties from background threads.
If you are using a backgroundworker you could use the ReportProgress event, which is even easier.

Mr47
  • 2,655
  • 1
  • 19
  • 25
0

also Depends if you are using WinForms or WPF, in Winforms you use Control.Invoke and in WPF you use Dispatcher class. WPF has more sophisticated thread UI dispatcher

Bek Raupov
  • 3,782
  • 3
  • 24
  • 42