Current Time in Titlebar

stevena
09-10-2003, 09:08 AM
How do you put the current time to show in the 'active' titlebar of a form. I know this can be done as I have downloaded somebody's program from here today but cannot remember who it was!!

I just cant work out how he's done it from the coding.


Can anyone help please?!!!

zak2zak
09-10-2003, 09:15 AM
May be this helps....

Form1.Caption = Format$(Now,"HH:MM:SS AM/PM")

stevena
09-10-2003, 09:29 AM
Thats superb!! How about showing the date too?!!!

Aspen2K
09-10-2003, 09:32 AM
Check out "User-Defined Date/Time Formats (Format Function)" in MSDN. This will give you all formats you want .

Aspen2K

zak2zak
09-10-2003, 09:33 AM
May be this helps..

Form1.Caption = Format$(Now,"DDDD, D MMMM YYYY - HH:MM:SS AM/PM")

Agent707
09-10-2003, 09:34 AM
Thats superb!! How about showing the date too?!!!
FormatDateTime(Now,vbLongDate) & " " & FormatDateTime(Now,vbLongTime)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum