Solved

How do delay(sleep) in VB.NET?

Posted on 2004-09-06
9
37,606 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now