PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Marty Francom on August 31, 2006, 01:25:37 AM

Title: Splash Box
Post by: Marty Francom on August 31, 2006, 01:25:37 AM
How would I create a splash box that would bedisplayed for 5 to 10 seconds and then close by itself?
Title: Splash Box
Post by: TechSupport on August 31, 2006, 09:16:10 AM
Should be pretty simple. Create a Splash form and show it non-modal in the WM_CREATE of your main form. Create a Timer control on your Splash form and set its 'Interval' property to say, 5000 (5 seconds). In the Timer event close the Splash form.

Function FRMMAIN_WM_CREATE ( _
                          hWndForm As Dword, _  ' handle of Form
                          ByVal UserData As Long _  'optional user defined Long value
                          ) As Long

  frmSplash_Show hWndForm, %FALSE
 
End Function



Function FRMSPLASH_TIMER1_WM_TIMER ( _
                                  hWndForm      As Dword, _  ' handle of Form
                                  wTimerID      As Dword  _  ' the timer identifier
                                  ) As Long

  FF_CloseForm hWndForm
 
End Function
Title: Splash Box
Post by: TechSupport on August 31, 2006, 09:17:06 AM
The above code assummed that you wanted your Splash screen to appear during program startup. Is that what you intended?
Title: Splash Box
Post by: Marty Francom on August 31, 2006, 09:01:53 PM
Thanks, Paul,   that was easy.... I kept going at from the idea of using a "MessageBox" control.   Sometimes I can't see the trees, the forest block the view....
...Marty