How do I retrieve which date the user clicked in a Calendar control?
I mean not only bit the HitDate value which will be exposed when the user clicked it, but just anytime.
I thought there was a Calendar1.CurrentValue property, but there isn't.
Thank you very much for the help.
Cannot find .CurrentValue property
Re: Cannot find .CurrentValue property
Hi!
Try the CaretDate property.
TiKu
Try the CaretDate property.
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find .CurrentValue property
For some reason it always returns "00:00:00" for me.
Re: Cannot find .CurrentValue property
Which operating system do you use? Does your application use Windows themes? Can you provide a sample project which exhibits the behavior?
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find .CurrentValue property
XP SP 2
Private Sub btnOk_Click()
m_bCancelled = False
m_Date = Me.Calendar1.CaretDate
If CStr(m_Date) = "00:00:00" Then
Me.BackColor = vbRed
Exit Sub
End If
Unload Me
End Sub
Does this help? I used an older version first, and I have upgraded to the latest version of the DateTimeControls now, but the behaviour is still the same.
Yes, I use themes.
Private Sub btnOk_Click()
m_bCancelled = False
m_Date = Me.Calendar1.CaretDate
If CStr(m_Date) = "00:00:00" Then
Me.BackColor = vbRed
Exit Sub
End If
Unload Me
End Sub
Does this help? I used an older version first, and I have upgraded to the latest version of the DateTimeControls now, but the behaviour is still the same.
Yes, I use themes.
Re: Cannot find .CurrentValue property
How is m_Date defined? I'll have a look at it tonight.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find .CurrentValue property
As a boolean.
Just a joke.
As "Date" of course.
Just a joke.
As "Date" of course.
Re: Cannot find .CurrentValue property
The Windows calendar control sometimes provides partly broken date values and the function that I use to convert those values to a VB6 date doesn't like such values.
I'll release an update tonight or tomorrow.
I'll release an update tonight or tomorrow.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!