Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 136,231 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,308 people online right now. Registration is fast and FREE... Join Now!




Timers

 
Reply to this topicStart new topic

Timers, I want an event to happen after a certain time. How?

tom1234
12 Oct, 2008 - 11:26 AM
Post #1

New D.I.C Head
*

Joined: 12 Oct, 2008
Posts: 2

I have made a program, which requires a user to enter a password, if they get it wrong 3 times, the log-in button is disabled. What I want to know is how to set up a timer so that 1 min after the button is disabled, it is unlocked. Please bear in mind I have just started using VB, and this is for my college course. Thank you in advance. Oh, and by the way, I am using VB 2005 Express
User is offlineProfile CardPM
+Quote Post

Damage
RE: Timers
12 Oct, 2008 - 12:45 PM
Post #2

D.I.C Addict
Group Icon

Joined: 5 Jun, 2008
Posts: 738



Thanked: 7 times
Dream Kudos: 75
My Contributions
add a timer control to your form, set the time limit that you want and in the timer event add the code to enable the button and switch off the timer. In the same event that disables the button, start the timer.
User is offlineProfile CardPM
+Quote Post

jacobjordan
RE: Timers
12 Oct, 2008 - 01:56 PM
Post #3

class Me : Perfection
Group Icon

Joined: 11 Jun, 2008
Posts: 1,163



Thanked: 32 times
Dream Kudos: 1625
My Contributions
Do what damage said. However, one thing he forgot to mention is that if you want your timer to go off after one minute, you must set the Interval property of the timer to 60000. Since the interval is measured in 1/1000 of a second, 60000 as an interval would be 60 seconds.
User is offlineProfile CardPM
+Quote Post

Damage
RE: Timers
12 Oct, 2008 - 06:04 PM
Post #4

D.I.C Addict
Group Icon

Joined: 5 Jun, 2008
Posts: 738



Thanked: 7 times
Dream Kudos: 75
My Contributions
yup that too, sorry tongue.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 03:19AM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month