Countdown Label display Double Integer

S

screechyboy

Hi,

I have used the Timer control to count down from 60 - 0 and display it
in a label on my form. I would like 0-9 to be double integers so 01,
02, 03 etc but cant figure out how to do it.

Any help greatly appreciated!

Steve
 
H

Herfried K. Wagner [MVP]

I have used the Timer control to count down from 60 - 0 and display it
in a label on my form. I would like 0-9 to be double integers so 01,
02, 03 etc but cant figure out how to do it.

\\\
Private m_Number As Integer = 60

Private Sub Timer1_Tick(...) Handles...
Me.Label1.Text = m_Number.ToString("00")
If m_Number = 0 Then
Me.Timer1.Enabled = False
Else
m_Number -= 1
End If
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top