Friday, December 30, 2005

Common Misconception: You can only create Forms on the UI Thread

A common misconception I run into from time to time is that you can only create a Form on the main UI thread of a .NET program. This is usually being confused with a different but similar rule.


"Forms and other UI elements can only be accessed from the thread they were created on"

It is perfectly legal to create forms on different threads and display them all at the same time. You just cannot perform cross thread access between the forms and controls or manipulate them from a different thread.

0 Comments:

Post a Comment

<< Home