Hello all,
I started recently working with .NET/C#/WindowsForms, coming from Win32/MFC programming. So, all my apologies if you feel I am too much trying to find similarities between both environments.
I have a UI application controlling the execution of a background worker thread. The thread is launched when the user presses a button, and must report about the current task being done, to the UI main thread (removing file #### , calculating something, etc.) -- no revolution in computing area ...:-))
For information, I am not using a BackgroundWorker instance, but a Thread object.
I saw in the documentation, that, to make the communication thread-safe (I mean : updating my UI with the last status generated by the worker thread), I have to use the pair of InvokeRequired/Invoke methods to guarantee that the update of the UI will be executed in the main thread.
OK. But ... What does the Invoke method
Under Win32/MFC, I used to post messages from the worker thread to the main thread message queue, assuming then that the main thread message pump would then unstack them and handle them as normal messages, and no risk of concurent UI updates.
Can I consider the Invoke method call to act as a message queuing method, or should I take care before updating the UI that normally monitored and updated through the message pump I mean : is there any risk to get conflicts between the user actions and the actions ordered by the worker thread
Hoping my question is clear ...
Thanks again.

Understanding Invoke method
mikets
Serge Bollaerts