|
-
Nov 13th, 2003, 08:14 AM
#1
Thread Starter
Hyperactive Member
Vb6 - Pausing a application ..
Pausing a application without using timer control ...
VB Code:
Private Sub Pause(Optional Delay As Integer = 1)
Dim dblWait As Double
Let dblWait = Timer: Do Until Timer < dblWait Or Timer >= dblWait + Delay: DoEvents: Loop
End Sub
-
Nov 13th, 2003, 03:09 PM
#2
Supreme User
What do you mean pause it? Just like setting the form enabled = true?
-
Nov 14th, 2003, 07:30 AM
#3
Thread Starter
Hyperactive Member
Originally posted by Madboy
What do you mean pause it? Just like setting the form enabled = true?
pausing the application means halting it for a specified interval.
Call that code from your form load like this ...
Pause 10
your form will not show when run until after 10 seconds .....
-
May 8th, 2007, 08:57 PM
#4
New Member
Re: Vb6 - Pausing a application ..
 Originally Posted by spoiledkid
pausing the application means halting it for a specified interval.
Call that code from your form load like this ...
Pause 10
your form will not show when run until after 10 seconds .....
--------
Worked. Thanks!
-
May 9th, 2007, 12:12 AM
#5
Re: Vb6 - Pausing a application ..
You could just use the Sleep() Function.
-
May 9th, 2007, 12:29 AM
#6
Junior Member
Re: Vb6 - Pausing a application ..
Yes the Sleep function will do precisely the same thing 
But good to have another way of doing it
-
May 9th, 2007, 08:33 PM
#7
Re: Vb6 - Pausing a application ..
Actually no, Sleep will do an entirely different thing. It halts the process entirely for the given amount of milliseconds. This means your program doesn't execute at all until given amount of time has passed.
The code in the first post keeps execution in the program and processor usage runs at 100% as it continuously checks for conditions.
-
May 9th, 2007, 08:45 PM
#8
Re: Vb6 - Pausing a application ..
Ok thanks for the explanation it was just that spoiledkid said...
your form will not show when run until after 10 seconds .....
so i assumed it was something like the Sleep() function
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
|