0
\$\begingroup\$

I'm wanting to make a old school timer like the picture below. How would I go about doing this in VD? I have tried it doing it with code bellow. The problem with this is that it starts with just seconds only adds the minutes section when you reach 1 minute.

enter image description here

Dim StartTime As DateTime
Dim PlayTime As TimeSpan

 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    StartTime = Now()
    End Sub

  Private Sub tmrCountUp_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrCountUp.Tick

    PlayTime = Now() - StartTime

    lblTime.Text = PlayTime.Hours & PlayTime.Minutes & PlayTime.Seconds

    lblTime.Text = lblTime.Text + 1
End Sub
\$\endgroup\$
2
  • 4
    \$\begingroup\$ You have tried, and what exactly isn't working? \$\endgroup\$ Commented Apr 20, 2012 at 12:43
  • 2
    \$\begingroup\$ Old school? What do "new school" timers look like? \$\endgroup\$ Commented Apr 20, 2012 at 17:40

1 Answer 1

1
\$\begingroup\$

You can format using this: http://msdn.microsoft.com/en-us/library/6t7dwaa5.aspx or use string formatting (string.padleft I think)

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.