View previous topic :: View next topic |
Author |
Message |
William Shaw
Joined: 08 Oct 2009 Posts: 19 Location: Canada
|
Posted: Mon Feb 06, 2012 2:15 am Post subject: Splash screen not terminating |
|
|
The splash screen starts properly, but does not exit (doesn't fade out). It remains in place on top of the main form of the application. The only way I could get rid of it was to terminate it from Task Manager.
I compared the code as I implemented it in the application against the sample Bootstrap project and it looks the same -- I didn't change the SplashForm class at all, and the code in Main is the same as the code in the sample except for the name of the .enc file.
Any suggestions? Could the application code somehow be preventing the splash page events from firing? Or did I just miss something obvious?
(BTW, it looks like the code in the DisplaySplash routine is checking the values in _fadeInTime and _fadeOutTime instead of the values in the arguments fadeInTime and fadeOutTime.)
If you would like to see the code, please let me know what to send. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Feb 06, 2012 5:41 am Post subject: |
|
|
Do the sample projects work OK for you?
What sort of application are you encrypting (Windows Forms or WPF)?
If your application is a WPF application then you need to ensure that your bootstrap has the compilation constant SUPPORT_WPF defined. This constant is used in the SplashForm to enable the code that will allow the SplashForm to close once a WPF application enteres the Idle state.
You're right about the range checks on the DisplaysSplash arguments. This shouldn't really affect anything if you are supplying valid arguments but we will fix this in the next update. _________________ Infralution Support |
|
Back to top |
|
|
William Shaw
Joined: 08 Oct 2009 Posts: 19 Location: Canada
|
Posted: Mon Feb 06, 2012 11:24 pm Post subject: |
|
|
Yes, the sample worked fine.
It's a Windows Forms app. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Feb 07, 2012 3:52 am Post subject: |
|
|
The SplashScreen hooks the Application.Idle event to close itself. This is usually fired by Windows once your application has fully loaded. If you are displaying a modal dialog (eg message box) before entering your application loop or doing something else unusual then it may not fire. In this case you call
Code: | Application.RaiseIdle(new EventArgs()); |
Before you display your dialog/message box to ensure that the splash screen is closed. _________________ Infralution Support |
|
Back to top |
|
|
William Shaw
Joined: 08 Oct 2009 Posts: 19 Location: Canada
|
Posted: Tue Feb 07, 2012 5:08 am Post subject: |
|
|
Thanks for the suggestion. I'll try it. |
|
Back to top |
|
|
|