Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
share|improve this question
4  
You have tried, and what exactly isn't working? –  Lohoris Apr 20 '12 at 12:43
2  
Old school? What do "new school" timers look like? –  Byte56 Apr 20 '12 at 17:40

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.