Sleep function ????? 
Author Message
 Sleep function ?????

Hi,
I need to stop a prg for n seconds in VB6, but it seems that SLEEP doesn't
exists.
What can I do ?
Thanks in advance
moro


Sun, 18 Aug 2002 03:00:00 GMT  
 Sleep function ?????
I know SLEEP from Qbasic.
But not every Qbasic have it.
Qbasic 4.0 haven't it too.
In Qbasic 4.0  i had used:

T = Timer
Do
Loop until  T + [Len of the break in sec.]  <  Timer

But under VB this have a disadvantage in this time the whole program stopt.
In Visual Basic you can use the timer object, bat it is very difrent.

Moro schrieb in Nachricht

Quote:
>Hi,
>I need to stop a prg for n seconds in VB6, but it seems that SLEEP doesn't
>exists.
>What can I do ?
>Thanks in advance
>moro

Sorry for my bad English, I came from Germany!


Sun, 18 Aug 2002 03:00:00 GMT  
 Sleep function ?????
Moro

You can use the Windows API Sleep function, declared as follows:

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

John..........

Quote:

> Hi,
> I need to stop a prg for n seconds in VB6, but it seems that SLEEP doesn't
> exists.
> What can I do ?
> Thanks in advance
> moro



Sun, 18 Aug 2002 03:00:00 GMT  
 Sleep function ?????
You can use the Do Loop, you only have to call the DoEvents function in it
and you're program will do other things also

Hope it helps,
    Max



Quote:
> I know SLEEP from Qbasic.
> But not every Qbasic have it.
> Qbasic 4.0 haven't it too.
> In Qbasic 4.0  i had used:

> T = Timer
> Do
DoEvents
> Loop until  T + [Len of the break in sec.]  <  Timer

> But under VB this have a disadvantage in this time the whole program
stopt.
> In Visual Basic you can use the timer object, bat it is very difrent.

> Moro schrieb in Nachricht

> >Hi,
> >I need to stop a prg for n seconds in VB6, but it seems that SLEEP
doesn't
> >exists.
> >What can I do ?
> >Thanks in advance
> >moro

> Sorry for my bad English, I came from Germany!



Mon, 19 Aug 2002 03:00:00 GMT  
 Sleep function ?????

Quote:

>You can use the Do Loop, you only have to call the DoEvents function in it
>and you're program will do other things also

Just as a matter of interest, I am really only getting back into VB,
version 5 Pro. I used VB3 quite e lot. If you placed a DoEvents in a
lopp in those bad old days, you would quite frequently crash the whole
PC/system.

I don't think this was just me from memorey. I think I remember others
commenting on it.

This has made me cautious. Has this changed in later versions.

Nick White --- HEAD:Hertz Music

(please remove ns from my header email address to reply)
....damn spam

    !!
   <")
   _/ )
   (   )
  _//- \__/



Mon, 19 Aug 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. sleep function

2. Windows API Sleep function

3. VB equivalent of a Sleep function?

4. sleep function in VB?

5. Simple sleep function

6. Pause, Delay, Wait, or Sleep Function

7. Sleep function in VB3?

8. Sleep Function & FileSystemObject

9. ASP sleep function

10. Sleep function in vbscript????

11. sleep function

12. Sleep function

 

 
Powered by phpBB® Forum Software