"news.microsoft .com" <Astroboy@hotma il.com> schrieb:[color=blue]
>I tried to use thread to load data to datagrid but it gived me errors?
>Anyone know how to solve it?[/color]
Windows Forms controls' instance members are not safe for multithreading,
which means that you cannot access them directly from another thread. Make
sure you are using 'Control.Invoke '/'Control.BeginI nvoke' together with
'Control.Invoke Required' to access the datagrid from the thread. Some more
information about Windows Forms and multithreading can be found here:
Multithreading in Windows Forms applications
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=multithread ing&lang=en>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Comment