Develop an application to display current date and time on a form
Refer Displaying Day for a given date also.
Refer Displaying Day for a given date also.
(A)Program Design :
(B) Property(Controls Used) :
- 2 Labels with Captions Date & Time
- 3 TextBoxes : Locked - True,BackColor-Gray,Text Property-Blank
- One Command Button (Caption - Current Time)
(C) Attaching Code to the Object :
Private Sub Command1_Click() Text1 = Format(Date, "dd/MM/yy") Text2 = Format(Date, "dddd,mmmm, d yyyy") Text3 = Time End Sub |
Private Sub Form_Load() Call Command1_Click End Sub |
(D) Output :
====================================================================
No comments:
Post a Comment