"Sarah" <sa********@powertechcanada.com> schrieb:
From a Windows form, how do I get a new different form to run in a
separate
thread? What about a function in a separate thread?
Avoid showing forms in separate threads. Instead, create and show all forms
in the application's main UI thread and perform blocking operations in
separate threads. Instance members of Windows Forms controls are not safe
for multithreading, so you cannot access them directly from the worker
threads. You will have to use 'Control.Invoke'/'Control.BeginInvoke' to
access the forms/controls from your threads.
Multithreading in Windows Forms applications
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=multithreading&lang=en>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>