Tip of the Month (January 2006) Creating a Splash Screen When your Visual CE application first comes up, instead of going directly into the form, you might want to display a "splash screen". The splash screen might have the name of the application, who provided it, where to call for support, etc. Your first inclination might be to do this: Just build a splash screen in the upper left region of the form. Your splash screen could use Label Controls to display the text. It might even display a bitmap using a read-only Scribble Control with the bitmap as the background image. And you would have a startup macro (see the January 2002 tip-of-the-month) that has two buttons: one that sleeps for a few seconds and a second that moves to the main part of the form. Unfortunately, this does not work since the Windows CE Operating System defers displaying the splash screen until after the macro completes. But, you can use this qwirk in the operating system to do exactly what you want. Say you want to add a splash screen that is displayed when your form (MyForm.vce) comes up. Create a second form (Splash.vce) that contains just your splash screen and a startup macro that does a RUN EXTERNAL of MyForm.vce. Then, on MyForm.vce, add a startup macro that SLEEPs for the a few seconds. To start your application, have the user run Splash.vce (not MyForm.vce). This will display the splash screen immediately and continue to display the splash screen while MyForm.vce is sleeping. When MyForm.vce finishes sleeping, the main form will then be displayed. This technique is especially useful if MyForm.vce natually takes long a time to come up (for example, if there are hundreds of controls on the form). In this case, you don't even need to have the start up macro on MyForm.vce.
|