Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / December 2003



Tip: Looking for answers? Try searching our database.

timer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wilfredo Perez - 30 Dec 2003 14:10 GMT
How do I show the time and date on a label.
Brian K. Sheperd - 30 Dec 2003 15:29 GMT
Is this what you are looking for?

Private Sub Form_Load()
Label1.Caption = Now()
End Sub

When the form is loaded, it will put the current time and date in a label.

Brian

> How do I show the time and date on a label.
Brian K. Sheperd - 30 Dec 2003 15:39 GMT
Or... If you want it to update at an interval, you can add the timer
control.  Timer interval is in miliseconds.

Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = Now()
End Sub

Private Sub Timer1_Timer()
Label1.Caption = Now()
End Sub

Brian

> How do I show the time and date on a label.
Ben Ben - 31 Dec 2003 08:13 GMT
Use the timer ActiveX on the left bar. Pull that icon on your developed
interface. Draw a label name Label1. and input the source code as follows

Private Sub Timer1_Timer()
  Label1.Caption = Time   ' Update time display.
End Sub

> How do I show the time and date on a label.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.