Solved

How do delay(sleep) in VB.NET?

Posted on 2004-09-06
9
37,610 Views
Last Modified: 2009-10-03
How do delay(sleep) in VB.NET?
0
Comment
Question by:LearnITvn
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 100 total points
ID: 11993287
System.Threading.Thread.Sleep(milliseconds)

0
 

Author Comment

by:LearnITvn
ID: 11993662
Thanks gregoryyoung
see again
0
 
LVL 1

Expert Comment

by:mpantana
ID: 12006380
System.Threading.Thread.CurrentThread.Sleep(milliseconds)
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12006667
why "CurrentThread" mpantana ? Sleep is a static method of the thread class that suspends whateever thread it is called from.
0
 
LVL 1

Expert Comment

by:mpantana
ID: 12008783
Just giving options...
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12009553
its not an option as you say it ...

public class foo {
    public static bar() { Console.Writeline("test"); }
}

now if I call foo.bar() it is no different than if I say foo f = new foo(); f.bar(); ... correct ?
0
 
LVL 1

Expert Comment

by:mpantana
ID: 12010197
...okay...bottom line, either way will work
0
 

Author Comment

by:LearnITvn
ID: 12023009
what happen???
0
 

Expert Comment

by:cloud_blue_sky14
ID: 23498986
I am creating an application that requires the user to press and hold their left mouse button.  While the left mouse button is pressed, I'd like a rapid mouse click event to happen.  EX: The code would simulate the user clicking and releasing their left mouse button, while the left mouse button is being held down.  When the user releases the left mouse button, the simulated clicking would stop.  Also, I would like to setup a delay between the clicks.  Is this possible? I am using Visual Basic 2008

Thanks in advance for your help and suggestions
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question