Nov 23, 2009

Button With Secconds

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming

Button With Secconds

ikkeugh
I've got a question :
How do u make those buttons that countdown :
if you don't press a button in (ex) 5 seconds , that that button will be chosen?
(like the one of windows if you don't have a legal version 8-) )

Comment/Reply (w/o sign-up)

faulty.lee
QUOTE(ikkeugh @ Jun 22 2007, 04:13 AM) *
I've got a question :
How do u make those buttons that countdown :
if you don't press a button in (ex) 5 seconds , that that button will be chosen?
(like the one of windows if you don't have a legal version 8-) )


You didn't mention about what programming language you're using. And i never since a windows that mention you don't have a legal version. I do see auto close windows for AVG auto update.

Generally, for windows, you can just start a timer with 1 second interval, along when you popup the windows, then update the the button showing a countdown on the button's text, on every tick of the timer. Keep static counter or a class wise variable for that purpose. When the counter tick to 0, close the window

Comment/Reply (w/o sign-up)

ikkeugh
QUOTE(faulty.lee @ Jun 22 2007, 10:42 AM) *
You didn't mention about what programming language you're using. And i never since a windows that mention you don't have a legal version. I do see auto close windows for AVG auto update.

Generally, for windows, you can just start a timer with 1 second interval, along when you popup the windows, then update the the button showing a countdown on the button's text, on every tick of the timer. Keep static counter or a class wise variable for that purpose. When the counter tick to 0, close the window

or for another exemple hitman pro ....
(windows : http://www.codinghorror.com/blog/images/th...not-genuine.jpg , you have to wait 5 seconds before you can hit it .) (i thinks you can also do this after 5 seconds it does it )

 

 

 


Comment/Reply (w/o sign-up)

Jimmy89
You still didn't mention which language you are coding in.

But basically all you need to do is have a timer counting each second, and as each time the timer fires, take 1 off the time. When the value equals 0 then then stop the timber and enable the button.
-jimmy

In VB.NET
CODE
Timer_Tick
    Do Until Count  = 0
         Count &= -1
    Loop
    'enable button now
End Timer

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Button Secconds


    Looking for button, secconds

See Also,

*SIMILAR VIDEOS*
Searching Video's for button, secconds
advertisement



Button With Secconds

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com