473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Countdown Label display Double Integer

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
Jan 19 '08 #1
2 2421
Have a look at the overloaded tostring methode

http://msdn2.microsoft.com/en-us/lib...49(vs.80).aspx

Cor

<sc*********@googlemail.comschreef in bericht
news:96**********************************@i12g2000 prf.googlegroups.com...
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
Jan 19 '08 #2
<sc*********@googlemail.comschrieb:
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
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jan 19 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bonnett | last post by:
I have been creating a generic countdown timer (source code below), counting the seconds, minutes, hours and days till an event, but I have having trouble with it finding out how many hours are...
8
by: Michael | last post by:
I have this script that works the way I want except for one thing... Once it hits zero it starts to count up and looks like this: -1:0-1:0-1:0-18 with the last number counting up. Can anyone...
31
by: jcrouse | last post by:
Is there a quick and easy way to change the color of a label controls border from the default black to white? Thank you, John
3
by: Neil Wallace | last post by:
Hi, This is an odd one. I've been struggling to get "double click" to work well for my controls. The same event handler works perfectly for buttons, but not for labels. Can anyone tell me...
3
by: JimJam | last post by:
Hello Peeps I have created a program in VB.NET 2003 that counts down from 7.5 hours to zero from 08:00. I have a button that starts a new countdown from 1 hour to zero whilst the first one is...
8
by: Arpan | last post by:
Consider the following code snippet (my main intention is to display the current time in a Label control as & when this ASPX page is accessed/refreshed): <script runat="server"> Class Clock...
4
by: tranky | last post by:
Hi programmers, i'm italian, and i need your help. Is it possible? There's a way to create a countdown control in asp.net? The control must shows in a label the countdown text. At the end of the...
0
by: VorTechS | last post by:
I'm having a problem with an inherited label, applying text rotation to aligned text. If text rotation is applied to the aligned text, the alignment goes 'nuts'. I can find no logic to what is...
0
by: Jorhajnes | last post by:
Hi there. Im very new to making games in flash, although I have used flash for quite some time now in web-based situations so I know my way around. Anyways, I thought it would be fun to try...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.