Home All Groups Group Topic Archive Search About
Author
13 Jan 2006 10:50 AM
Dean
Help,
       In Vb.net how can I make the timer tick.Plzz don't make it to
complcated just give me the code because I am new to VB and I am only
11 yrs old

Author
13 Jan 2006 11:02 AM
Peter Proost
Hi,

enter a value in the interval property and set the timer enabled property to
true

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)


Show quoteHide quote
"Dean" <simondevrie***@gmail.com> schreef in bericht
news:1137149401.055741.169130@g44g2000cwa.googlegroups.com...
> Help,
>        In Vb.net how can I make the timer tick.Plzz don't make it to
> complcated just give me the code because I am new to VB and I am only
> 11 yrs old
>
Author
13 Jan 2006 11:22 AM
Armin Zingler
"Dean" <simondevrie***@gmail.com> schrieb
> Help,
>       In Vb.net how can I make the timer tick.Plzz don't make it to
> complcated just give me the code because I am new to VB and I am
> only 11 yrs old

Step by step: (skip the steps you already know :-) )

1. Create a new project. In the "Templates" box, select "Windows
applicaton".
2. Open the toolbox window. If not yet visible, select menu View -> Toolbox
3. In the toolbox window, open the "Windows Forms" section (if not open
already)
4. Doubleclick on the 'Timer'. You should now have a clock icon at the
bottom of the designer window and the word 'Timer1' next to it.
5. In the "properties" window, there is a value next to "Interval". If you
type 1000 in there, the timer ticks every 1000 milliseconds, i.e. every
second. 2000 is every 2 seconds and so on.
6. In the same window, change the value next to the property called
"Enabled" to "True". This makes the timer tick right from the start of your
application.
7. Doubleclick on the clock icon. You will be lead to source code editor
window.
8. You see a new Sub called "Timer1_Tick". You can now type the commands
that you want to be executed whenever the timer ticks. For example, you can
write "Beep" (without quotation marks) there.
9. Start by pressing the "play" button on the toolbar at the top.

If you need further help, you're welcome!


Armin
Author
13 Jan 2006 11:47 AM
Carlos J. Quintero [VB MVP]
Hi Dean,

Try:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
   Timer1.Interval = 2000
   Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
   MessageBox.Show("Tick")
End Sub

--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com



Show quoteHide quote
"Dean" <simondevrie***@gmail.com> escribió en el mensaje
news:1137149401.055741.169130@g44g2000cwa.googlegroups.com...
> Help,
>       In Vb.net how can I make the timer tick.Plzz don't make it to
> complcated just give me the code because I am new to VB and I am only
> 11 yrs old
>
Author
13 Jan 2006 12:03 PM
Herfried K. Wagner [MVP]
"Dean" <simondevrie***@gmail.com> schrieb:
>  Vb.net how can I make the timer tick.Plzz don't make it to
> complcated just give me the code because I am new to VB and I am only
> 11 yrs old

Place a 'System.Windows.Forms.Timer' from the toolbox on the form.  Assign
the number of milliseconds between the ticks to the control's 'Interval'
property and set its 'Enabled' property to 'True'.  Then double click the
timer component and add the code to the timer's 'Tick' event (the handler
will be generated automatically).

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>