Click to See Complete Forum and Search --> : Make the splash form stay a little longer . . .


John Reynolds
June 26th, 2001, 10:46 AM
is there a Delay? A Pause? How do you get the splash form to stay for, say 2 seconds?

Thanks,
John

Captain Nuss
June 26th, 2001, 10:50 AM
One possible solution would be to place a timer into the spash screen form and set it's delay to a value of, let's say 2000. In the Timer1_timer event you could place a Unload Me statement.

Don't forget to rate my posts if they help. You can contact me directly at Christoph.Schulze@gmx.co.uk

Clearcode
June 26th, 2001, 10:54 AM
Add a Timer control to frmSplash and set its Interval property to be 2000.

Comment out the form_keypress that normally unloads the form:

private Sub Form_KeyPress(KeyAscii as Integer)
' don't unload until timere fires -- Unload me
End Sub




and instead make it unload when the timer fires...


private Sub Timer1_Timer()

Unload me

End Sub




You can vary the time it stays up by altering the Interval porperty of the timer.

HTH,
D

-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com

John Reynolds
June 26th, 2001, 11:53 AM
I thought I had it, but the code doesn't execute until the Main form closes . . . (?)


private Sub Timer1_Timer()
Unload me
End Sub

Captain Nuss
June 26th, 2001, 01:12 PM
1. Did you enable the timer?

2. (if you did enable it) Did you set the splash form to be the starting form of the application? If not, try that and do the initialization tasks (like loading the main form) in the Form_Load procedure of the splash form. Insert another Form.show statement into the timer event procedure to show the main form. That might possibly help.

Don't forget to rate my posts if they help. You can contact me directly at Christoph.Schulze@gmx.co.uk

John G Duffy
June 26th, 2001, 02:25 PM
In SUB Main make sure you have a
'
FrmSPlash.Show (Or whatever your splash form is named) BEFORE frmMain.SHOW.
Also if the frmMain_load procedures are long running, insert a DOEVENTS in long loops so frmSplash will get control once in a while.

John G