PDA

Click to See Complete Forum and Search --> : Timing in Visual Basic 5.0


simguy
Jan 9th, 2000, 11:56 AM
I am wondering how to make a form just sit there for 10 seconds and then run some code.

I am designing a program and I need to get the first form in the series to pause and just sit there and be displayed for 10 seconds. After that, I would like it to hide that form and change to another.

I know how to hide and show forms, but as for the 10 second delay, I need some help. Any help I receive in this matter is greatly appreciated

------------------
Adam Hughes (SimGuy)
simguy@home.com
ICQ #: 19335996
http://www.simcityhq.com/simport

jritchie
Jan 9th, 2000, 12:03 PM
Ok don't have an exact answer....but...have used a call to the sleep API, to do something like this for a splash screen, or...could try a timer control with some sort of setfocus or timer1_click or something.

Clunietp
Jan 9th, 2000, 01:08 PM
Add a timer to your form, interval of 10000, enabled = true

On the Timer1_Timer event, add your code.

It will execute after 10 seconds after the form loads

simguy
Jan 9th, 2000, 07:28 PM
Thank you Clunietp and jritchie for the help. Both of your ideas worked great.

Thanks again!

------------------
Adam Hughes (SimGuy)
simguy@home.com
ICQ #: 19335996
http://www.simcityhq.com/simport