Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 07-05-2008, 12:42 PM   #1
Daemon Poster
Join Date: Oct 2006
Posts: 684
Default stopwatch

I'm making a stopwatch code with milliseconds but i don't think the millisecond text is moving fast enough, here is the code

Public Class Form1

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label4.Text = Val(Label4.Text) + Val(1)
        If Label4.Text = 100 Then
            Label3.Text = Val(Label3.Text) + Val(1)
            Label4.Text = 0
            If Label3.Text = 60 Then
                Label2.Text = Val(Label2.Text) + Val(1)
                Label3.Text = 0
                If Label2.Text = 60 Then
                    Label1.Text = Val(Label1.Text) + Val(1)
                    Label2.Text = 0
                End If
            End If
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Timer1.Enabled = False Then
            Timer1.Enabled = True
            Timer1.Enabled = False
        End If
    End Sub
End Class
ringtemek is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 06:52 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0