Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 374
  • Last Modified:

How to make a digital clock.

I like to know how to create a digital clock using Visual Basic.
0
Xiaosi
Asked:
Xiaosi
1 Solution
 
FischermaenCommented:
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.

Greetings

Andy
0
 
barnesd1Commented:
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.

Dave
0
 
CimperialiCommented:
serach for clock at
www.planet-source-code.com
you will find sources for it
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Richie_SimonettiIT OperationsCommented:
I did a custom control in the past, if you like i could paste the code.
0
 
supunrCommented:
Private Sub Timer1_Timer()
    Label1.Caption = Format(Now, "HH:MM.ss")
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).
0
 
XiaosiAuthor Commented:
Richie pls paste the code for me.
0
 
Richie_SimonettiIT OperationsCommented:
Source is at http://www.angelfire.com/realm/vb-shared/index.html
item 9
or maybe you could download here:
http://www.angelfire.com/realm/vb-shared/dclock.zip

Take in mind that it was done several years ago and ameliorate it could be a good and possible idea.
;)
Cheers
0
 
CleanupPingCommented:
Hi Xiaosi,
This old question (QID 20553291) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
GPrentice00Commented:
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0
 
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.
0
 
GPrentice00Commented:
Richie_Simonetti

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 www.cnn.com is dead, its quite temporary - since it is anglefire.com, 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.
0
 
Richie_SimonettiIT OperationsCommented:
Splitting is good if Planet-source does what is needed.
Thanks for your time.
0
 
Richie_SimonettiIT OperationsCommented:
Holy smoke!, why a "B" grade?
0
 
GPrentice00Commented:
can lead a horse to water...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now