Hi All,
I'm trying to create a Stopwatch that starts with Milliseconds.
I can already run a Clock with milliseconds but I want to start from zero like a stopwatch.
Here's what I have for a running clock.
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TextBox1.Text = "00:00:00:000" TextBox2.Text = "00:00:00:000" End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Start() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim upTime As TimeSpan = TimeSpan.FromMilliseconds(Environment.TickCount) TextBox1.Text = (Date.Now.ToString("hh:mm:ss:fff")) TextBox2.Text = ' what next, to create a stopwatch with Milliseconds End Sub
Thanks in advance,
sparrow1





Reply With Quote