Help

  • Thread starter Thread starter Dean
  • Start date Start date
D

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
 
Hi,

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

Greetz Peter
 
Dean said:
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
 
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
 
Dean said:
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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top