[Basic] Things about a Timer [Basic]

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
4 posts Page 1 of 1
Contributors
User avatar
lawrence12
Dedicated Member
Dedicated Member
Posts: 73
Joined: Tue Mar 02, 2010 3:21 am

Hello, Am Lawrence!

I realize I have not been posting for quite a while..
So an idea came up to me and told me to post this on the forums ^_^

Enjoy!

[Basic] Time Intervals [Basic]

Timer:
Well a timer to me is something you use to give something a time or a time to run, etc

Making a timer:
Simply Double clicking the timer object in the ToolBox

Timer Properties:
Name : The "Name" property , represents the name of the Timer, E.G "progressTimer" a progress bar timer for example.

Enabled : The "Enabled" value is set to false, meaning the timer will never activate unless you make something that activates it, "Start Progress" a button to start the Timer, So what if we set it to True? That means when you run the program , the timer will keep running , unless you make something that makes it stop ^_^

Interval : When you give something a time or an interval, it means you make it wait for example, "This progress bar will run in 5 seconds." , That basically means the timer will start in 5 seconds or 5000 milliseconds to be exact.

How often do we need to use Timers?
It depends on what kind of application you making, but most requires a Timer(Not All of course), For Example you made an application that has a "Startup Loader", it requires a Timer. So I think its not a question, its a must sometimes ^_^

Are Timers really that useful?
Yes, they can be very helpful and useful at the same time, making a progress bar sometimes needs a Timer, startup loader, etc

"I made an application that does not require a Timer, Haha what now?"
As I said earlier, not all applications need a Timer, ^_^

{Using Timers}
The basic coding for example:
Timer1.Interval = 1000 'This will set your timer's Interval to 1 second'
{Tips and Tricks}
- Something you might want to know.
Once upon a time, there was a guy called Coda, he was trying to make an auto clicker.
All was perfect, he ran his program, it was PERFECT NOTHING WAS WRONG AT ALL,
Then came the problem, one label said : "Click Delay: 1000 seconds", well of course you didn't want something
like that! So he thought about it for a second, "What if I divide it by a Hundred?" He tried it and ran it
again, this time it showed : "Click Delay: 10 seconds" well he finally got it! And you might be wondering,
"What is the story for and what do I learn from this?" Well, first of I am going to teach you how to do it
^_^

First of all, he was able to do it by making a variable, so lets do it also! But remember to make a label ^_^
Make a new dim variable, E.G
Dim timerInterval As Integer = Timer1.Interval / 100
Now go back to the form, if you don't know double click form1.
Now on the form type this in:
label1.text = label1.text & timerInterval
Now it should say 10, if your interval is 1000.
Next we ask ourselves, What on earth happened? Well all we did was divide that timer interval to 100 to make it into tens! I say that is sometimes useful if you dont want it by 1000s ^_^

End
-------------------------------------------------------------------------------------------
The tutorial might get continued if the poll's votes get higher.
User avatar
lawrence12
Dedicated Member
Dedicated Member
Posts: 73
Joined: Tue Mar 02, 2010 3:21 am

@_@ I forgot how to make it a poll, it might not even be possible.
Anyways votes are still 1/10
User avatar
lawrence12
Dedicated Member
Dedicated Member
Posts: 73
Joined: Tue Mar 02, 2010 3:21 am

lawrence12 wrote:
@_@ I forgot how to make it a poll, it might not even be possible.
Anyways votes are still 1/10
Oh yeah, just rate ^_^
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

lawrence12 wrote:
lawrence12 wrote:
@_@ I forgot how to make it a poll, it might not even be possible.
Anyways votes are still 1/10
Oh yeah, just rate ^_^
Just use the edit button ^_^
http://vagex.com/?ref=25000
4 posts Page 1 of 1
Return to “Tutorials”