From: "Andrew Lathrop" <[EMAIL PROTECTED]>
Subject: Splash Screen


> Can anyone give me an idea as to how i can creeate a spalsh screen that
does
> one of two things.
> 1. It only shows up the first time the program is run.
> 2. It shows up unless the user checks a checkbox saying not too.

1. Create a Form for your splash screen.
2. Use a variable (e.g., gShowSplash) to flag whether or not the splash
screen has been or should be displayed.
3. Use PrefSetAppPreferences to save the flag between program executions and
PrefGetAppPreferences to get the flag when the program starts.
4.  In your PilotMain, in the sysAppLaunchCmdNormalLaunch case, just before
FormGoToForm(MainForm) which opens your main form, include something like:
if ( gShowSpash ) ShowSplash();
5. Code for ShowSplash():

static void ShowSplash( void )
{
 FormPtr frmP;
 frmP = FrmInitForm( SplashForm );
 FrmDoDialog( frmP );
 FrmDeleteForm( frmP );
 gShowSplash = false;    // if you don't want to do it again
}

To modify this so it won't display when the checkbox is cleared, add code to
get the value of the checkbox (which should also be saved with your app
preferences) and set the value of gShowSplash accordingly.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to