To make a watch in VB
To make a watch in VB
firstly take five labels
name these five lables as lblDay ,lblMonth ,lblYear ,lblDate ,lblTime
then take a time in the timer properties give the intervals 1000
double click on the page and paste this coding as given below after running it shows the system date and time
Dim Today As Variant
Today = Now
lblDay.Caption = Format(Today, "dddd")
lblMonth.Caption = Format(Today, "mmmm")
lblYear.Caption = Format(Today, "yyyy")
lblDate.Caption = Format(Today, "d")
lblTime.Caption = Format(Today, "hh:mm:ss ampm")
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home