Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 37669
  • Last Modified:

How do delay(sleep) in VB.NET?

How do delay(sleep) in VB.NET?
0
LearnITvn
Asked:
LearnITvn
  • 3
  • 3
  • 2
  • +1
1 Solution
 
gregoryyoungCommented:
System.Threading.Thread.Sleep(milliseconds)

0
 
LearnITvnAuthor Commented:
Thanks gregoryyoung
see again
0
 
mpantanaCommented:
System.Threading.Thread.CurrentThread.Sleep(milliseconds)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
gregoryyoungCommented:
why "CurrentThread" mpantana ? Sleep is a static method of the thread class that suspends whateever thread it is called from.
0
 
mpantanaCommented:
Just giving options...
0
 
gregoryyoungCommented:
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
 
mpantanaCommented:
...okay...bottom line, either way will work
0
 
LearnITvnAuthor Commented:
what happen???
0
 
cloud_blue_sky14Commented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now