|
-
Jan 17th, 2001, 05:28 AM
#1
Thread Starter
New Member
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.
-
Jan 17th, 2001, 05:34 AM
#2
PowerPoster
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
-
Jan 17th, 2001, 05:54 AM
#3
Thread Starter
New Member
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.
-
Jan 17th, 2001, 05:59 AM
#4
PowerPoster
irwa82, sometimes we might overlook the solution for some easy problem too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|