-
Hi,
I know that dates have been mentioned on the message board but I can't seem to get a handle on them.
I am using the standard calendar control that is shipped with vb6 and would like to make it so that the month, year and day are the same as the windows date when loaded.
Any help would be greatly appreciated.
-
try this way.
Code:
'DTPicker Control
Private Sub Form_Load()
DTPicker1.Value = Date
End Sub
'Calendar Control
Private Sub Form_Load()
Calendar1.Value = Date
End Sub
'MonthView Control
Private Sub Form_GotFocus()
MonthView1.Value = Date
End Sub
-
Thanks Chris,
I was tring to do api calls to windows to get the date and break it down into year, month and day to set in manualy.
you saved me hours of development time, and there was only one line of code required, silly me.
-
irwa82, sometimes we might overlook the solution for some easy problem too.