It is not possible to interact with GUI elements from different threads than the GUI thread. If you want to do this, you have to change your design. For instance creating and showing dialogs must be delegated to the GUI thread. The GUI thread being the default thread of your application.
Suppose you have a form with some edit boxes and you want to change these edit boxes text values from another thread than the GUI thread, then you need to modify your code as well, because the actual change needs to be done on the GUI thread.
I am on a business trip right now so I cannot give you an example of my own, but this involves calling invoke and using a delegate. If needed you can check if this is really needed by calling invokerequired on the control on which you want to do the change. I am quite sure for dialogs that they need to be created from the GUI thread too via the same mechanism.
An example can be found here :