In the background I want to load some control after form loaded.
I tried threading but it does not allow me to add control because current
thread have not created the form.
Also please tell me what BackGroundWorker control suppose to do.
How do I do it.
Please advise me.
Thanks, Dan
Stoitcho Goutsev (100) - 04 Apr 2006 19:50 GMT
Dan,
you need ot use Control.Invoke to marshal the code for creating the control
and adding it to the form to the UI thread.

Signature
HTH
Stoitcho Goutsev (100)
> In the background I want to load some control after form loaded.
> I tried threading but it does not allow me to add control because current
[quoted text clipped - 6 lines]
>
> Thanks, Dan
Dan, Vascas - 04 Apr 2006 20:52 GMT
Thanks for the reply Goutsev.
Can you please provide me an example.
I know very little about vb.net.
Dan
> Dan,
> you need ot use Control.Invoke to marshal the code for creating the
[quoted text clipped - 10 lines]
>>
>> Thanks, Dan
Herfried K. Wagner [MVP] - 04 Apr 2006 21:49 GMT
"Dan, Vascas" <Dan@noemailcom> schrieb:
> In the background I want to load some control after form loaded.
> I tried threading but it does not allow me to add control because current
> thread have not created the form.
>
> Also please tell me what BackGroundWorker control suppose to do.
In addition to the other replies, I suggest to check out the following
resources:
Multithreading in Windows Forms applications
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=multithreading&lang=en>

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>