Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.Net Coding Challenge #3
#17
Well that was easy.
Here it is... (sorry for not working on the GUI)

[Image: ilaefy.gif]

Code:
Public Class Form1
    Dim SW As New System.Diagnostics.Stopwatch
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Enabled = True
        SW.Start()
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = String.Format("{0}:{1}:{2}:{3}", SW.Elapsed.Hours.ToString, SW.Elapsed.Minutes.ToString, SW.Elapsed.Seconds.ToString, SW.Elapsed.Milliseconds.ToString)
    End Sub
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Timer1.Stop()
        SW.Reset()
        Label1.Text = "0:0:0:000"
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Timer1.Enabled = False
        SW.Stop()
    End Sub
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Timer1.Enabled = True
        SW.Start()
    End Sub
End Class
[Image: just-cause-2-header.jpg]
Reply


Messages In This Thread
.Net Coding Challenge #3 - by Resistance - 04-18-2011, 01:07 PM
RE: .Net Coding Challenge #3 - by Fragma - 04-18-2011, 01:37 PM
RE: .Net Coding Challenge #3 - by Untouch - 04-18-2011, 01:55 PM
RE: .Net Coding Challenge #3 - by KoBE - 04-18-2011, 03:04 PM
RE: .Net Coding Challenge #3 - by Modestep - 04-18-2011, 02:16 PM
RE: .Net Coding Challenge #3 - by Resistance - 04-18-2011, 02:54 PM
RE: .Net Coding Challenge #3 - by Fragma - 04-19-2011, 04:02 AM
RE: .Net Coding Challenge #3 - by KoBE - 04-19-2011, 10:23 AM
RE: .Net Coding Challenge #3 - by Fragma - 04-19-2011, 10:27 AM
RE: .Net Coding Challenge #3 - by KoBE - 04-19-2011, 10:30 AM
RE: .Net Coding Challenge #3 - by AceInfinity - 04-19-2011, 11:01 AM
RE: .Net Coding Challenge #3 - by KoBE - 04-19-2011, 01:07 PM
RE: .Net Coding Challenge #3 - by AceInfinity - 04-19-2011, 02:59 PM
RE: .Net Coding Challenge #3 - by AceInfinity - 04-19-2011, 04:54 PM
RE: .Net Coding Challenge #3 - by KoBE - 04-20-2011, 06:34 AM
RE: .Net Coding Challenge #3 - by AceInfinity - 04-20-2011, 01:26 PM
RE: .Net Coding Challenge #3 - by iCrack - 05-04-2011, 10:46 AM
RE: .Net Coding Challenge #3 - by AceInfinity - 05-04-2011, 10:55 AM
RE: .Net Coding Challenge #3 - by iCrack - 05-04-2011, 11:09 AM
RE: .Net Coding Challenge #3 - by KoBE - 05-04-2011, 04:15 PM
RE: .Net Coding Challenge #3 - by iCrack - 05-05-2011, 10:06 AM
RE: .Net Coding Challenge #3 - by KoBE - 05-05-2011, 10:34 AM
RE: .Net Coding Challenge #3 - by AceInfinity - 05-05-2011, 03:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Code Challenge - Created by Ace AceInfinity 5 1,713 04-24-2012, 10:27 AM
Last Post: AceInfinity
  Help with coding jerrojack 1 882 12-29-2011, 03:27 AM
Last Post: AceInfinity
  Coding-Central.net - Coding, cracking and webmastering. w00pz 5 2,436 09-02-2011, 01:43 PM
Last Post: AceInfinity
  Help Coding A Downloader? Fragma 9 3,432 08-25-2011, 06:10 PM
Last Post: LiveModz
  .Net Coding Challenge #5 iCrack 18 5,937 05-21-2011, 12:49 AM
Last Post: thanasis2028

Forum Jump:


Users browsing this thread: 16 Guest(s)