Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


(TuT-Visual basic 6) How to make a countdown timer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Hack-Addict
Master Cheater
Reputation: 0

Joined: 20 Nov 2007
Posts: 287

PostPosted: Thu Aug 07, 2008 3:39 pm    Post subject: (TuT-Visual basic 6) How to make a countdown timer Reply with quote

Hey, so this is going to be a countdown tutorial.

We'll use:
A timer
A command button
A label


Ok, so bring your label, your timer and command button on the forum, rename the caption on the label to say, 60.
Rename the command button to whatever you want.

Now, open up the timer, and insert this code:

Code:
Label1 = val(label1.caption) - val(1)

This will tell the label to countdown from whatever value it has in it.

Now put your timer set at 1000 for 1 second.

Now put this in for the command button
Code:
If timer1.enabled = true then
Timer1.enabled = false
//This tells the timer to be enabled or disabled depending on if it's enabled or not.
command1.caption = "Whatever you want here"
//This tells the command button caption to be whatever you want when the timer's disabled or enabled.
Else
If timer1.enabled = false then
Timer1.enabled = true
Command1.caption = "Whatever you want here"
end if
end if


There you go, now you have your countdown timer. Smile

_________________

Sciextron made the userbar up here, Rep him =D

[img]http://i145.photobucket.com/albums/r225/Michaell61/header.gif[/img] <---Visit theprocoders today!
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Thu Aug 07, 2008 3:42 pm    Post subject: Reply with quote

That's pretty easy to make, and I'd use a integer variable to use as countdown, instead of a caption.
Back to top
View user's profile Send private message
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Thu Aug 07, 2008 6:44 pm    Post subject: Reply with quote

Moller wrote:
That's pretty easy to make, and I'd use a integer variable to use as countdown, instead of a caption.


use either Long (when your interval is bigger than 1000) or Single (when your interval is smaller than 1000) because Longs are fast, and Singles are good for divisions without having to round to the nearest integer.

_________________
Get kidnapped often.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites