|
-
Mar 14th, 2007, 07:15 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Sleep?
Hi Everyone,
I used the below for sleeping in vb6, but how do I sleep in vb.NET 2005?
The Sleep Windows API function lets you put the application to sleep. Enter the
following declaration into a standard module.
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Then, simply call the function from your code, as in:
Sleep 5000
-
Mar 14th, 2007, 07:30 AM
#2
Re: Sleep?
vb Code:
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim x As Long = 1200 'in milliseconds
System.Threading.Thread.Sleep(x) 'wait for 1200 milliseconds
End Sub
Please mark you thread resolved using the Thread Tools as shown
-
Mar 14th, 2007, 07:44 AM
#3
Thread Starter
Addicted Member
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
|