Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing a Form on a Seperate Thread...?
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01149321
Message ID:
01150175
Views:
26
I am not updating the UI in any way, so using Invoke does not help. My problem is calling the ShowDialog() method, while passing it a reference parameter to a form that resides on another thread (In order for the form to "center" itself based on the referenced form). That's where I get a Cross Threading problem. Invoke does not help in this situation, or not in any way that I been able to find.

>Ben,
>
>You can only update the UI from the thread the UI was created on. To update the UI in a thread safe manner you can use the form's Invoke method.
>
>This should help you out.
>
>http://msdn.microsoft.com/msdnmag/issues/05/03/AdvancedBasics
>
>In DotNet 2.0 you can use the BackgroundWorker component and subscribe to a few events which makes the process a whole lot easier.
>
>Regards
>Neil
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook
Previous
Reply
Map
View

Click here to load this message in the networking platform