Solved

How do delay(sleep) in VB.NET?

Posted on 2004-09-06
9
37,615 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

827 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