473,387 Members | 2,436 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,387 software developers and data experts.

Display time in Label with constant update

14
Hi,

Me to Express vb 2k5
As I could remember there was a funtion in the old VB where simply type "Time" or something then it will show you the real time and second appear on the label.

Is that funtion still available in VB express 2k5, or it had been renamed to something else?

thx
Jan 17 '07 #1
8 17172
kenobewan
4,871 Expert 4TB
Have you tried something like:
Expand|Select|Wrap|Line Numbers
  1. lblTime.Text = Format(Now, "HH:mm:ss")
Hope that this helps.
Jan 17 '07 #2
Mulm3h
14
Have you tried something like:
Expand|Select|Wrap|Line Numbers
  1. lblTime.Text = Format(Now, "HH:mm:ss")
Hope that this helps.
i tried that before it does show the time, but it doesnt refresh like a realtime:(
Jan 17 '07 #3
kenobewan
4,871 Expert 4TB
Not sure purpose of clock, but live clocks are usually done through JS - check out:
Clocklink
Jan 17 '07 #4
Mulm3h
14
Not sure purpose of clock, but live clocks are usually done through JS - check out:
Clocklink
my idea behind using a clock with ticking second was for the user to know the current time when the program run all will be blackout only the program is visible so i need a clock for my VB project to let users know what time it is.
Jan 18 '07 #5
my idea behind using a clock with ticking second was for the user to know the current time when the program run all will be blackout only the program is visible so i need a clock for my VB project to let users know what time it is.
if your project is web application, you must use script ( javascript , or other ) to show current time.

if your project is window application, you can try by timer controls, place the code to tick event of timer control. set enabled to true and interval to 1000 for timer control's properties.
Jan 18 '07 #6
Well, I know this much.

In VB6, you can make a label showing the time and make it update by it self. In .NET I am still stumped on how to do that correctly.

but the Code for VB6 is

Expand|Select|Wrap|Line Numbers
  1. lbltime.caption = Time
  2.  
and it's that easy, I wish I knew how to do it in .NET, I'm sure my programming teacher will tell me what the code is, if I get it I will share it with everyone.

Till then,

Overdosed
Apr 1 '07 #7
Check out htis link:

http://www.mycsharpcorner.com/Post.aspx?postID=23

It shows how you can make your own Clock User Control, then you can use in your Windows Form.

The basic idea is simple: "you use a Timer object to refresh a Lable Text property with the current time".

Hope this helps!
Apr 1 '07 #8
I need a javascript to click an URL link at 7:00pm CST everyday which starts a web presentation?
May 23 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Agency | last post by:
I'm still working on the bpm counter. I need to have at least 2 displays that are not static. One would be a clock/running time and the other would should the current beat count. How would I...
3
by: Terry Carroll | last post by:
I've got a small batch image-processing program (it adds the time a digital photo was taken to the lower right of the image), and as a feature, I wanted to show a thumbnail of each image it was...
0
by: Carl | last post by:
I have a main form with navigation buttons on it and a label showing for example Record 1 of 15 using recordsetclone on it and eveything works fine. When I move through the records the record...
10
by: Bart Goeman | last post by:
Hi, I have a question about how to put redundant information in data structures, initialized at compile time. This is often necessary for performance reasons and can't be done at run time (data...
29
by: SysSpider | last post by:
Hi again, This is my problem: when i try to compile the code that contains the function below, i get this: -- gcc:21: error: case label does not reduce to an integer constant gcc:24: error:...
0
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database...
3
by: Will | last post by:
Hi there .. I wanna know how to display the time in a label and have it change every sec with the system cock ... meaning that its always syncronized with the system clock, Sec per sec. I...
1
by: rbinington | last post by:
Hi, I am trying to write a DNN module that has the ability to insert articles into an article repository. I want the users to be able to move pages around and enter text into the FCKEditor. I...
5
by: Rex Mottram | last post by:
Can anyone explain this? % cat t.c #include <stdio.h> #define FIRST "first" #define SECOND "second" int main(int argc, char *argv)
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.