473,804 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print of Current Time continuously

28 New Member
Hello Guys!!!


My form has a label which i print the current time.
I want to make a counter which will give me the time each minute.

So, whatever i see on my computer the same think to see and in my label.

I used the following command for printing the time
lblTime.Text = TimeString()

I use VB2005.

Can anyone help with some vbcode because i am desperate...?
May 22 '07 #1
2 1848
Stroumfs
28 New Member
Hello Guys!!!


My form has a label which i print the current time.
I want to make a counter which will give me the time each minute.

So, whatever i see on my computer the same think to see and in my label.

I used the following command for printing the time
lblTime.Text = TimeString()

I use VB2005.

Can anyone help with some vbcode because i am desperate...?

I found the solution is
Public Class Form1

Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load

lblTime.Text = Format(Now, "hh.mm.ss tt")

End Sub

Private Sub Timer1_Tick(ByV al sender As System.Object, ByVal e As System.EventArg s) Handles Timer1.Tick

lblTime.Text = Format(Now, "hh.mm.ss tt")

End Sub

End Class

time interval 100

thnx
anyway


We can close this case
May 22 '07 #2
Killer42
8,435 Recognized Expert Expert
I would recommend setting the timer interval a fair bit longer. This will fire ten times a second, which seems like a lot of unnecessary work.

Although if the "tt" in your format represents tenths of a second, then perhaps you do want it to update that frequently?
May 22 '07 #3

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

Similar topics

23
63703
by: stewart.midwinter | last post by:
No doubt I've overlooked something obvious, but here goes: Let's say I assign a value to a var, e.g.: myPlace = 'right here' myTime = 'right now' Now let's say I want to print out the two vars, along with their names. I could easily do this: print "myPlace = %s, myTime = %s" % (myPlace, myTime)
7
2037
by: JCO | last post by:
How do you do this. I would like for it to be as dynamic as each page refresh. Thanks
3
3096
by: Andrea | last post by:
Hello, I am looking for the directions on how to set a report to print continuously, without a paper feed. I have set one up using the Label Wizard, but how do I set it up in an existing report? I have looked through all the property settings and cannot find any reference to it. It is driving me mental! Thanks, Andrea
1
3742
by: Kadir | last post by:
Hi All, I have a problem in printing reports. I have a dot matrix printer. I want to print a report that varies in height each time according to the details. If I set the page to A4 it goes onto multiple pages if the details are large. I want it to be printed continuously without spilling over to the next page. It can be made to be printed on continuous sheet of paper. Can anyone help me out? Regards, Kadir
1
2708
by: karanam ravi kiran via DotNetMonster.com | last post by:
hi friends, i am fresher in the world of .net, i have problem to display time in asp.net web continuously. i want to display time on the form like the "live timer on windows task bar" plz help me over this thing thank you ".net Monster" --
2
1968
by: Colli | last post by:
Hi: I need to setup a continuously updating system Date/Time in my user interface. I can get the system date/time and can cause it to update with a button-click but I can't seem to figure out how to cause it to update continuously (as it does in the bottom right corner of my desktop). Can anyone help me with this. Please E-Mail me directly with your advsce. Thanks. Colli From...
1
1969
by: batista | last post by:
Hello all, I have a third praty grid control...named C1grid. Im using it in one of my apps.. Now, I have bind this grid to a custom dataset class named "DataViewEx". The code of the class is below... Now what happens is that im updating this dataviewex class from a separate thread.....
3
1835
by: Mark Ingram | last post by:
Hi, I'd like to know the best way of checking the current time during a demonstration product. At the minute i store the first run date, then compare that to the system time, but obviously a user can just change their clock back a month and continue using the product. I heard it is best to check the access time on a system dll? I had a quick look at the user32.dll file and realised the access time was the time my machine booted up, but...
6
1883
by: mattmao | last post by:
Hi all. There is a challenge question I encountered recently, which says: "In plain English, there are six different ways when you want to tell someone else about the current time: It is five past seven. It is eleven to ten. It is half past nine. It is a quarter past eight. It is a quarter to ten.
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9593
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9169
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7633
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.