Different thread for window forms/mdi childs/user controls

  • Thread starter Thread starter Rajat
  • Start date Start date
R

Rajat

Hi,

I have a MDI application. Right now I am applying the threading in my
application to make it faster. I have some of the doubts regarding that.
Please clarify.

1. Are the childs of the MDI parent open in different thread or the same UI
thread?
2. Is it ok if I want to open multiple MDI child windows on their individual
threads?
3. If I place some user control on the form. Will that be on a different
thread?
4. Can I place the UI related functionality of User Control on a separate
thread and it it ok to do so?


Regards,
Rajat Tandon.
 
Rajat,

There is one simple answer for your question and that's it - Controls cannot
parent controls that are created in different thread. In other words you
cannot have user controls created in different thread nor MDI chidren
created in different threads as well as only the thread created the control
can modify its properties and call its methods. The latter is good to know
as a rule of a thumb event though some methods and propeties could be called
across threads.
 
Back
Top