Results 1 to 2 of 2

Thread: Another stupid question

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    Middle of nowhere
    Posts
    45

    Another stupid question

    Ok, this time i have a question about timers.

    what do i need to make them go?

    Like say i wanted a timer to count and then display that counted number on a lable or something? what would i do?


    ---Flac
    Everything great once started with the words "That will never catch on, you shouldnt even bother" be great, go against the crowed, do something stupid, you might become famous.

  2. #2
    Addicted Member
    Join Date
    Oct 2002
    Posts
    210
    VB Code:
    1. Dim count As Integer 'form level
    2.  
    3.     Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    4.         Timer1.Enabled = True 'enables timer. you could just have it enabled if you click on the timer and look for the Enabled property
    5.     End Sub
    6.  
    7.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    8.         count += 1
    9.         Label1.Text = count
    10.     End Sub
    [vbcode]
    Me.Hide()
    [/vbcode]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width