PDA

View Full Version : Splash image at program close...


sferguson
12-29-2003, 12:03 PM
Hi Gang,

I'm working on the following personal head-scratcher...

1. User clicks "Exit".
Label Object > Actions > On Click...

01 Application.Exit();


2. Prompt "Are you sure you want to exit?"

Project > Global Functions...

01 function QueryAllowProjectClose() --called when program is exiting

02 confirmation = Dialog.Message("Exit this progam?", "Are you sure that you want to exit?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

03 if confirmation == 6 then --the yes button was pressed
04 return true; --allow the program to close
05 end
06
07 if confirmation == 7 then --the no button was pressed
08 return false; --tell the program to 'stop closing'
09 end
10
11 return true; --if for any reason confirmation is not set to yes OR no, allow the program to close

12 end


3. If the user chooses "Yes"...

Do the following:
A.) FIRST - Close my 790x545 application window (... the window directly beneath the dialog box)

B.) SECOND - Display my smaller splash window for a specific duration, and allows any impatient users to "click through" to close.


Here's the part that's got me scratching my head:

Splash window is currently working fine, with the exception that it opens ON TOP of my app's 790x545 window, THEN closes both the main app window and splash window at the same time.

Problem is, when the app interface is still visible beneath the closing credits splash window, all the closing credits text, copyright info and special thanks get lost in the mix.

Not to mention that the resulting set of stacked windows causes temporary vertigo...

What suggestions can anyone offer?

kpsmith
12-29-2003, 12:51 PM
Quick Suggestion... Resize you main app window to 0 pixel x 0 pixel before loading the Splash Window. Use Window.SetSize

Didn't try it but it should work....

sferguson
12-29-2003, 12:53 PM
Thanks, I'll give it a shot.

jhn9119
12-29-2003, 07:35 PM
you could use the Window.Hide before the Dialog.SplashImage which should work :)

kpsmith
12-29-2003, 09:09 PM
Maybe an even better solution.... Haven't used that action yet....

sferguson
12-29-2003, 11:30 PM
Thanks fellas, Window.Hide worked great!

jhn9119
12-30-2003, 11:24 AM
no worries, glad it helped :)