How to make a digital clock.

I like to know how to create a digital clock using Visual Basic.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hello Xiaosi,

just put a timer-control to your form with the property "interval" set to 1000. In the timer_Timer - Event you simply add an "format(Now, "Long Time")" to whatever control you want to output your digital timer.


If you are talking about how you would create the digital display you could use mspaint.exe to create bitmaps of all the digits, eg
 |  --|
 | ,  | for 17, its difficult to show here but I hope you  get my drift.  Once you have got bitmaps for the digits 0 to 9 then just change the properties of 4 picture boxes (or 6 to include seconds) to show the time.

Hope this helps.

serach for clock at
you will find sources for it
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Richie_SimonettiIT OperationsCommented:
I did a custom control in the past, if you like i could paste the code.
Private Sub Timer1_Timer()
    Label1.Caption = Format(Now, "")
End Sub

' and change the font of the label1 to suit your needs (i.e. big font size + Font bold) you might be able to download different type of fonts suitable for digital clocks. as  Fischermaen mentioned, add the timer control and set the interval to 1000 (1 sec).
XiaosiAuthor Commented:
Richie pls paste the code for me.
Richie_SimonettiIT OperationsCommented:
Source is at
item 9
or maybe you could download here:

Take in mind that it was done several years ago and ameliorate it could be a good and possible idea.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hi Xiaosi,
This old question (QID 20553291) needs to be finalized -- accept an answer, split points, or get a refund.  Please see for information and options.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->PAQ - with points refunded

Please leave any comments here within the next seven days.


EE Cleanup Volunteer
Richie_SimonettiIT OperationsCommented:
I posted an url from where to download the program and control with full source code. what's the problem with that?
I don't know if Xiaosi had downloaded it but due to non further explanation i could assume that it was what he/she needs.

When I tried the link to evaluate it but the site came up dead.  I guess it was a fluke because its alive now.  In retrospect, I should have realized it should have been valid - like if is dead, its quite temporary - since it is, and not something more obscure.
The planet-source link also appeared to be down when I checked, but is working.  Having followed the two links, one is generic with a recommended search term, one is a direct link to a very good example project.  

A split could be argued becuase Cimperiali posted a workable 'solution' first, but the specific link offered is directly on point.

I'm changing my list recommendation to --> Moderator evaluate last comments to choose

Barring any disagreements, R_S to get the points.
Richie_SimonettiIT OperationsCommented:
Splitting is good if Planet-source does what is needed.
Thanks for your time.
Richie_SimonettiIT OperationsCommented:
Holy smoke!, why a "B" grade?
can lead a horse to water...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.