Re: BackgroundWorker problems
Sean Dockery <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <005401c8286d$093c6b40$6500a8c0@loki> |
Quick question from someone new to .NET: Aren't you forbidden from calling into the GUI from a thread other than the GUI event processing thread? If that is the case, shouldn't you be looking to doing all of your GUI-related code by posting windows messages (or some similar vehicle equivalent to what you did in the WIN32 days) to the main GUI event processing thread? There are probably a number of alternative approaches to doing this, such as having your BackgroundWorker thread's delegate report progress and completion status through non-GUI properties that are read by a Timer component in the form, for example. Am I way off in suggesting this type of approach? Kindest regards, _____ From: [email protected] [mailto:[email protected]] On Behalf Of Nassar, Anthony Sent: November 16, 2007 7:53 AM To: Ian Wood; Lisle, Ron; [email protected] Subject: Re: [Nunit-users] BackgroundWorker problems Check out the code I just posted: I had to create the form on a separate thread, and call ShowDialog(). Even so, neither the form nor the BackgroundWorker is ever disposed! I can't figure it out. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users