PDA

Click to See Complete Forum and Search --> : How do I implement a "wait" in my code?


Mudgen
Jan 4th, 2000, 02:53 AM
I do I implement eg. "wait for 1 second" then proceed through the code?

Jan 4th, 2000, 03:08 AM
I'm not sure what's it's called but I think the Sleep Function would work. Same with a timer.

Jan 4th, 2000, 03:15 AM
I think it's :

sleep(1000) ' 1000 = 1 second.

Knight

MartinLiss
Jan 4th, 2000, 03:28 AM
You can also put your program to "sleep" for any length of time using this API:

Public Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)


------------------
Marty

ChrisJackson
Jan 4th, 2000, 04:11 AM
Hi Mudgen,

In order to use the Sleep Function, you have to use both Martin and Knight_Vision's code together:


Option Explicit

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Form_Load()
Sleep (3000)
End Sub


All the best.

Chris

Mudgen
Jan 4th, 2000, 05:02 AM
Hello ChrisJackson
I am Writing for Windows NT.
Is your code OK for this?

MartinLiss
Jan 4th, 2000, 08:30 AM
I'll answer for him/her... Yes.

------------------
Marty

ChrisJackson
Jan 4th, 2000, 10:35 AM
Thanks Martin. You're right about the Sleep Function working with Windows NT. By the way, it's him.

Chris