Cannot find .CurrentValue property

The place for threads about TimoSoft DateTimeControls.
Post Reply
TickTick
Lt. Commander
Posts: 54
Joined: 17 Feb 2009, 01:41

Cannot find .CurrentValue property

Post by TickTick »

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.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Cannot find .CurrentValue property

Post by TiKu »

Hi!

Try the CaretDate property.

TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
TickTick
Lt. Commander
Posts: 54
Joined: 17 Feb 2009, 01:41

Re: Cannot find .CurrentValue property

Post by TickTick »

For some reason it always returns "00:00:00" for me.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Cannot find .CurrentValue property

Post by TiKu »

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!
TickTick
Lt. Commander
Posts: 54
Joined: 17 Feb 2009, 01:41

Re: Cannot find .CurrentValue property

Post by TickTick »

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.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Cannot find .CurrentValue property

Post by TiKu »

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!
TickTick
Lt. Commander
Posts: 54
Joined: 17 Feb 2009, 01:41

Re: Cannot find .CurrentValue property

Post by TickTick »

As a boolean.

Just a joke.

As "Date" of course.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: Cannot find .CurrentValue property

Post by TiKu »

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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply