English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how do i make a simple clock in Visual Basic from scratch

2007-01-27 05:12:14 · 3 answers · asked by Java 4 in Computers & Internet Programming & Design

3 answers

If you're using Visual BASIC 6, it's pretty easy. It only requires two controls on the form:

1) add a TIMER control, set the INTERVAL property to 1000, and the ENABLED property to TRUE.

2) add a LABEL control, and clear it's caption.

3) in the TIMER_TIMER() event (the only event the timer responds to), add the following code:

Label1.caption = Now

=======================

Now is an intrinsic function that gets the system date and time.

Setting the TImer's INTERVAL to 1000 makes the event fire every second.

2007-01-27 05:29:02 · answer #1 · answered by Richard H 7 · 0 0

bypass to the toolbox in seen worry-loose, in many situations on the left area of the window, scroll down, and placed a timer, with a splash white analog timer image next to it, on the style. this ought to have a backside column pop up with Timer1 and the little timer image returned. in case you check out its residences, you could substitute the era for how long it takes to click. you could insert a label, additionally, and at the back of the Timer, you're able to code for it to characteristic one million or .one million, or regardless of to, we could say, the variable tmr, for timer, and characteristic it reveal interior the label every time the timer ticks. whether, with a view to do all of this, you need to set Timer1.Enabled=real interior the style load, or whenever you prefer it to start ticking. wish this helped. =]

2016-11-27 22:27:51 · answer #2 · answered by ? 4 · 0 0

go here:
http://www.wolfebyte.com/visual-basic-clock.php

2007-01-27 05:22:28 · answer #3 · answered by oohay_member_directory 4 · 0 1

fedest.com, questions and answers