Home » Developer & Programmer » Forms » Splash screen reappears everytime First Form(Menu) is accessed
Splash screen reappears everytime First Form(Menu) is accessed [message #149450] Thu, 01 December 2005 18:58 Go to next message
tzd1
Messages: 24
Registered: October 2005
Location: Gibbsboro
Junior Member
I have several forms. Say frm_a - frm_e. When program is run I have a PRE-FORM trigger:
DECLARE
splash_timer TIMER;
BEGIN
:global.path:='g:\Proj4\';
read_image_file(:global.path||'splashnw.tif','TIFF','splash_block.splash_image');
splash_timer:=create_timer('splash_timer',8000,no_repeat);
END;

The program starts splash screen appears about 8 seconds the menu appears (frm_a) . I can select any form from the main and the program will jump to that form( ok so far). Each form has a return to main menu button with PL/SQL - do_key('exit_form');

however when I return to the main menu the splash screen reappears, but I want the splash screen to appear when program is opened , thats why I placed a "no_repeat" in the PRE-FORM trigger.

I also have a WHEN-TIMMER-EXPIRED :
show_window('window1'); --window that menu is on
go_item('menu.pb_student');--first button on menu


Any ideas?

[Updated on: Fri, 02 December 2005 17:54]

Report message to a moderator

Re: Splash screen reappears everytime a form is closed [message #149512 is a reply to message #149450] Fri, 02 December 2005 01:39 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Set a global variable 'GLOBAL.SPLASH'. Give it 'TRUE' on first startup and after the display of the splash you set it to 'FALSE'

Only show the splash when the global is 'TRUE'

MHE
Re: Splash screen reappears everytime a form is closed [message #149679 is a reply to message #149512] Fri, 02 December 2005 17:50 Go to previous messageGo to next message
tzd1
Messages: 24
Registered: October 2005
Location: Gibbsboro
Junior Member
Thx, but how and where would I set the global variable from?

Not sure if theis is related, but when I open the program the
Splash_Canvas appers then the main menu ( Form_A ), then any button I click on to go to another form has a call similar to:
call_form(:global.path||'project4b');

Then each of these other forms has a Return to Main Menu button with the code:
do_key('exit_form');
Which closes the current form, the redisplays the Splash Screen ( which is an issue) then the Main menu re-appears ( which is good ), but then when I click the Exit Button with the code also of:
do_key('exit_form');
Instead of exiting the previuos form which was opned is re-displayed.

Thx in advance!!

Re: Splash screen reappears everytime a form is closed [message #149680 is a reply to message #149679] Fri, 02 December 2005 18:31 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Well a global variable in Forms is exactly what the name suggests: it is known all over your application. The nice thing about it is that you can define it like this:
DEFAULT_VALUE('TRUE','GLOBAL.SHOW_SPLASH')

If the variable :GLOBAL.SHOW_SPLASH has already been created before and received another value, the above statement does nothing.

This opens possibilities. You can create the variable like mentioned above and change it's value afterwards. So, initialize it to 'TRUE', show the splash (if the :global.show_splash = 'TRUE') and set it to 'FALSE'. There's nothing more to it.

Note: this comes from memory Wink

MHE
Previous Topic: Urgent - Please Help
Next Topic: value in form
Goto Forum:
  


Current Time: Fri Sep 20 03:23:16 CDT 2024