How do I do a SendMessage like operation in C#

  • Thread starter Thread starter chris.dannemiller
  • Start date Start date
C

chris.dannemiller

In VC++ When I wanted to send a message to a window from a worker
thread I would use SendMessage. Events only work Semi-well in C#
becuase certain GUI operations require they run in the same thread that
the window exists in. Such as displaying a balloon on the tray. Does
anyone know a good way to do this?
 
In order to make a call to the thread that the UI is running on, you can
call the Invoke method on a control that was created on that thread. This
will allow you to pass a delegate that will get invoked on the UI thread, as
well as the parameters to pass to it.

Hope this helps.
 
Back
Top