|
-
May 22nd, 2000, 01:46 PM
#1
Thread Starter
New Member
Hi I was wondering how can you make an application pause for less than a second without using a timer control event?
Thankyou
-
May 22nd, 2000, 02:39 PM
#2
Member
use the sleep() API call. It lets you specify the number of milliseconds to sleep for, and also tells Windows that something else can have the processor time 
Code:
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sleep numberOfMillisecondsToSleepFor
Note that this will prevent the app from responding to user events.
Hope this helps 
K
----------------------------------
VB6 Ent SP4 Win2K Pro Platform SDK
-
May 23rd, 2000, 03:51 AM
#3
Thread Starter
New Member
Thankyou
Thanks this helps heaps
-
May 23rd, 2000, 03:56 AM
#4
Hyperactive Member
Keep in mind that the shortest delay you can have is 10ms. =)
-
May 23rd, 2000, 12:41 PM
#5
Fanatic Member
-
May 23rd, 2000, 01:08 PM
#6
Hyperactive Member
Timer is the same way.
didn't you hear about the new Microsoft Math?
1 = 10 Maybe
5 = 10 Maybe
7 = 10 Maybe
11 = 20 Maybe 15
You can't trust these routines at short frequencies.
I have done multiple test on this, it's a nightmare for fast COM port timing.
Good Luck 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|