|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Splash form stays openI have a winforms app written in Vs2005 Vb.Net, The setiings are to Enable
the application Framework and I defined a splashform. Works fine if no errors occur. I do a checking on the mainform load event to make sure that my database connectivity works OK. If it does not, I give the user a warning message, but he can end up getting an unhandled exception that closes down the app, which is what I want in that case. However when the app shuts down, the splash screen remains visible. I think that it is running in its own thread and it does not necessarely close down when the app closes. I think best thing to do is to use the application events, see if the splashscreen is still open and if it is, close it down. However I'm at a loss on how to code this, and maybe there is another better way, I was looking also for a property somewhere where you could set the max time the splash screen would remain loaded whatever the case. But I could not find it. Any help would be appreciated Bob Hello Bob,
> I was What class are you using as your SplashForm? Can you post the namespace > looking also for a property somewhere where you could set the max time > the > splash screen would remain loaded whatever the case. But I could not > find > it. > Any help would be appreciated and dll if you know it -- Jared Parsons [MSFT] jared***@online.microsoft.com Bob, I had a very similar problem and based on feedback I got from Microsoft
in the MSDN forums, it looks like you may be experiencing an confirmed bug in the Application Framework. See here for details... http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=121737&SiteID=1 Basically, what I theorize is going on is that the Application Framework will close the splash screen after it's done initializing the main startup form. But if you cancel the creation of the startup form (say, because you encountered a database error and want to shut down the application), the startup form never completes its initialization. The Application Framework is happily sitting there checking to see if the startup form is initialized, finding that it's not, and happily waiting some more. Ad infinitum. My solution? Unfortunately, because of this issue, I ended up not using the Application Framework splash screen feature and managed the creation and closing of my splash screen myself. HTH - Mitchell S. Honnert Show quoteHide quote "Bob" <bduf***@sgiims.com> wrote in message news:OGTGWRvmGHA.856@TK2MSFTNGP03.phx.gbl... >I have a winforms app written in Vs2005 Vb.Net, The setiings are to Enable >the application Framework and I defined a splashform. Works fine if no >errors occur. I do a checking on the mainform load event to make sure that >my database connectivity works OK. If it does not, I give the user a >warning message, but he can end up getting an unhandled exception that >closes down the app, which is what I want in that case. However when the >app shuts down, the splash screen remains visible. I think that it is >running in its own thread and it does not necessarely close down when the >app closes. > I think best thing to do is to use the application events, see if the > splashscreen is still open and if it is, close it down. However I'm at a > loss on how to code this, and maybe there is another better way, I was > looking also for a property somewhere where you could set the max time the > splash screen would remain loaded whatever the case. But I could not find > it. > > Any help would be appreciated > > Bob > Yeah, you're right thats exactly what is happening.
You got a code snippet for managing the splash form yourself? I would grately appreciate it. Bob Show quoteHide quote "Mitchell S. Honnert" <n***@REMhonnertOVE.com> wrote in message news:urRungvmGHA.3352@TK2MSFTNGP02.phx.gbl... > Bob, I had a very similar problem and based on feedback I got from > Microsoft in the MSDN forums, it looks like you may be experiencing an > confirmed bug in the Application Framework. See here for details... > > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=121737&SiteID=1 > > Basically, what I theorize is going on is that the Application Framework > will close the splash screen after it's done initializing the main startup > form. But if you cancel the creation of the startup form (say, because > you encountered a database error and want to shut down the application), > the startup form never completes its initialization. The Application > Framework is happily sitting there checking to see if the startup form is > initialized, finding that it's not, and happily waiting some more. Ad > infinitum. > > My solution? Unfortunately, because of this issue, I ended up not using > the Application Framework splash screen feature and managed the creation > and closing of my splash screen myself. > > HTH > > - Mitchell S. Honnert > > "Bob" <bduf***@sgiims.com> wrote in message > news:OGTGWRvmGHA.856@TK2MSFTNGP03.phx.gbl... >>I have a winforms app written in Vs2005 Vb.Net, The setiings are to Enable >>the application Framework and I defined a splashform. Works fine if no >>errors occur. I do a checking on the mainform load event to make sure that >>my database connectivity works OK. If it does not, I give the user a >>warning message, but he can end up getting an unhandled exception that >>closes down the app, which is what I want in that case. However when the >>app shuts down, the splash screen remains visible. I think that it is >>running in its own thread and it does not necessarely close down when the >>app closes. >> I think best thing to do is to use the application events, see if the >> splashscreen is still open and if it is, close it down. However I'm at a >> loss on how to code this, and maybe there is another better way, I was >> looking also for a property somewhere where you could set the max time >> the splash screen would remain loaded whatever the case. But I could not >> find it. >> >> Any help would be appreciated >> >> Bob >> > > And yeah I saw what they suggest as solution in the linkyou gave me, I'll
give that a shot also. THANKS. Show quoteHide quote "Mitchell S. Honnert" <n***@REMhonnertOVE.com> wrote in message news:urRungvmGHA.3352@TK2MSFTNGP02.phx.gbl... > Bob, I had a very similar problem and based on feedback I got from > Microsoft in the MSDN forums, it looks like you may be experiencing an > confirmed bug in the Application Framework. See here for details... > > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=121737&SiteID=1 > > Basically, what I theorize is going on is that the Application Framework > will close the splash screen after it's done initializing the main startup > form. But if you cancel the creation of the startup form (say, because > you encountered a database error and want to shut down the application), > the startup form never completes its initialization. The Application > Framework is happily sitting there checking to see if the startup form is > initialized, finding that it's not, and happily waiting some more. Ad > infinitum. > > My solution? Unfortunately, because of this issue, I ended up not using > the Application Framework splash screen feature and managed the creation > and closing of my splash screen myself. > > HTH > > - Mitchell S. Honnert > > "Bob" <bduf***@sgiims.com> wrote in message > news:OGTGWRvmGHA.856@TK2MSFTNGP03.phx.gbl... >>I have a winforms app written in Vs2005 Vb.Net, The setiings are to Enable >>the application Framework and I defined a splashform. Works fine if no >>errors occur. I do a checking on the mainform load event to make sure that >>my database connectivity works OK. If it does not, I give the user a >>warning message, but he can end up getting an unhandled exception that >>closes down the app, which is what I want in that case. However when the >>app shuts down, the splash screen remains visible. I think that it is >>running in its own thread and it does not necessarely close down when the >>app closes. >> I think best thing to do is to use the application events, see if the >> splashscreen is still open and if it is, close it down. However I'm at a >> loss on how to code this, and maybe there is another better way, I was >> looking also for a property somewhere where you could set the max time >> the splash screen would remain loaded whatever the case. But I could not >> find it. >> >> Any help would be appreciated >> >> Bob >> > > *scratches his head* Ugh! you're kidding right? *stomache churns* Glad I'm
finding this out NOW rather than later. I've just gotten done adding some setup code in the initializing of my main form. It detects if the app has been run before or not, and if not, runs the setup wizard... so... it sounds like I need to shut off the application framework and do it the old-fashioned way. They way I'd like to see it run: splash happens. Main form loads and displays, splash goes away, setup wizard appears. ... On the other hand, it makes sense.... -ca Show quoteHide quote "Mitchell S. Honnert" wrote: > Bob, I had a very similar problem and based on feedback I got from Microsoft > in the MSDN forums, it looks like you may be experiencing an confirmed bug > in the Application Framework. See here for details... > > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=121737&SiteID=1 > > Basically, what I theorize is going on is that the Application Framework > will close the splash screen after it's done initializing the main startup > form. But if you cancel the creation of the startup form (say, because you > encountered a database error and want to shut down the application), the > startup form never completes its initialization. The Application Framework > is happily sitting there checking to see if the startup form is initialized, > finding that it's not, and happily waiting some more. Ad infinitum. > > My solution? Unfortunately, because of this issue, I ended up not using the > Application Framework splash screen feature and managed the creation and > closing of my splash screen myself. > > HTH > > - Mitchell S. Honnert > > "Bob" <bduf***@sgiims.com> wrote in message > news:OGTGWRvmGHA.856@TK2MSFTNGP03.phx.gbl... > >I have a winforms app written in Vs2005 Vb.Net, The setiings are to Enable > >the application Framework and I defined a splashform. Works fine if no > >errors occur. I do a checking on the mainform load event to make sure that > >my database connectivity works OK. If it does not, I give the user a > >warning message, but he can end up getting an unhandled exception that > >closes down the app, which is what I want in that case. However when the > >app shuts down, the splash screen remains visible. I think that it is > >running in its own thread and it does not necessarely close down when the > >app closes. > > I think best thing to do is to use the application events, see if the > > splashscreen is still open and if it is, close it down. However I'm at a > > loss on how to code this, and maybe there is another better way, I was > > looking also for a property somewhere where you could set the max time the > > splash screen would remain loaded whatever the case. But I could not find > > it. > > > > Any help would be appreciated > > > > Bob > > > > >
Show quote
Hide quote
On Wed, 28 Jun 2006 16:49:21 -0400, "Bob" <bduf***@sgiims.com> wrote: With "Use SplashFrom" enabled, the SplashForm is the first object that>I have a winforms app written in Vs2005 Vb.Net, The setiings are to Enable >the application Framework and I defined a splashform. Works fine if no >errors occur. I do a checking on the mainform load event to make sure that >my database connectivity works OK. If it does not, I give the user a warning >message, but he can end up getting an unhandled exception that closes down >the app, which is what I want in that case. However when the app shuts down, >the splash screen remains visible. I think that it is running in its own >thread and it does not necessarely close down when the app closes. >I think best thing to do is to use the application events, see if the >splashscreen is still open and if it is, close it down. However I'm at a >loss on how to code this, and maybe there is another better way, I was >looking also for a property somewhere where you could set the max time the >splash screen would remain loaded whatever the case. But I could not find >it. > >Any help would be appreciated > >Bob > loads. If I want to check prerequisites (like OS) and do not want the app to run if a condition is not met, I put that code in the SpashForm: Public Sub New() If some condition is not valid then MessageBox.Show("Condition not met") End End If ' This call is required by the Windows Form Designer. InitializeComponent() End Sub In the above, the SplashForm and app never load if the condition is not met. If I want to test for a condition (like Internet connectivity), warn the user, but not prevent the app from running, I do that in the MainForm's Shown Event. Gene Thanks Gene, those are good ideas.
I'll get used to this .net stuff yet :-) Bob Show quoteHide quote "gene kelley" <o***@by.me> wrote in message news:mh46a2hats1agdchuspghjfcgk7vc48do4@4ax.com... > On Wed, 28 Jun 2006 16:49:21 -0400, "Bob" <bduf***@sgiims.com> wrote: > >>I have a winforms app written in Vs2005 Vb.Net, The setiings are to Enable >>the application Framework and I defined a splashform. Works fine if no >>errors occur. I do a checking on the mainform load event to make sure that >>my database connectivity works OK. If it does not, I give the user a >>warning >>message, but he can end up getting an unhandled exception that closes down >>the app, which is what I want in that case. However when the app shuts >>down, >>the splash screen remains visible. I think that it is running in its own >>thread and it does not necessarely close down when the app closes. >>I think best thing to do is to use the application events, see if the >>splashscreen is still open and if it is, close it down. However I'm at a >>loss on how to code this, and maybe there is another better way, I was >>looking also for a property somewhere where you could set the max time the >>splash screen would remain loaded whatever the case. But I could not find >>it. >> >>Any help would be appreciated >> >>Bob >> > > With "Use SplashFrom" enabled, the SplashForm is the first object that > loads. If I want to check prerequisites (like OS) and do not want the > app to run if a condition is not met, I put that code in the > SpashForm: > > Public Sub New() > If some condition is not valid then > MessageBox.Show("Condition not met") > End > End If > ' This call is required by the Windows Form Designer. > InitializeComponent() > End Sub > > > In the above, the SplashForm and app never load if the condition is > not met. > > > If I want to test for a condition (like Internet connectivity), warn > the user, but not prevent the app from running, I do that in the > MainForm's Shown Event. > > Gene > > |
|||||||||||||||||||||||