Question Disabling a Splash Screen when Application.Restart is called

forloop22

New member
Joined
Dec 28, 2011
Messages
1
Programming Experience
1-3
Hello

I have an application with a splash screen which gets shown before the application starts. One of the requirements of the application is to allow users to restart (or atleast clear the form) so that other test cases can be ran. Because there are so many forms and variables, we elected to simply call Application.Restart() to accomplish this.

What we would like to do now is disable the Splash Screen when Application.Restart() is called. That is, only show the Splash Screen when the application is initially started, not when it is restarted.

Is this possible? Any suggestions would be greatly appreciated.
 
My first reaction is that using Application.Restart for your stated purpose is a lazy option. Personally, I would have actually reset the state of the current session. I'm not aware of any way to specifically not display the appointed splash screen within the bounds of the application framework. I think that what you would have to do is add some code to the splash screen itself to check whether it is a restart and, if it is, then close itself. You could use My.Settings to store a value indicating whether it's s restart or not.
 
Back
Top