RE: Splash Screen..thread safe

2010-02-26 Thread Greg Keogh
Anthony, the sample cs file I sent you shows how to do Application.Run(formInstance) in a thread. It's surprisingly few lines of code. Greg

RE: Splash Screen..thread safe

2010-02-26 Thread Anthony
If you have some code that would be great...haven't got huge experience with threading From: ausdotnet-boun...@lists.codify.com [mailto:ausdotnet-boun...@lists.codify.com] On Behalf Of James Chapman-Smith Sent: Friday, 26 February 2010 11:03 PM To: 'ausDotNet' Subject: RE

RE: Splash Screen..thread safe

2010-02-26 Thread James Chapman-Smith
Hi Anthony, The very first thing you should do is remove the "Application.DoEvents()" calls. These are inherently bad and will cause all sorts of concurrency and threading issues. You can end up with re-entrancy & stack overflows... The best thing is to create the splash screen in its own A

RE: Splash Screen..thread safe

2010-02-25 Thread Greg Keogh
Hi Anthony, I've just send you OFFLIST a copy of my splash screen class from a few years ago. Just in case it might help. The main form creates an instance of the splash class which runs its own message loop in an STA thread. You can call methods of the class to display progress messages from t

RE: Splash Screen..thread safe

2010-02-25 Thread Keir Nathan
You should use Invoke to open the splash form on the main UI thread. http://msdn.microsoft.com/en-us/library/zyzhdc6b.aspx Nathan From: ausdotnet-boun...@lists.codify.com [mailto:ausdotnet-boun...@lists.codify.com] On Behalf Of Anthony Sent: Friday, 26 February 2010 12:50 PM To: 'ausDotNet' Subj