Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Sunday, July 24, 2011

VB-61 : Displaying Current Date and Time

Develop an application to display current date and time on a form

 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: