Calendar does not "throw" any events

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

Calendar does not "throw" any events

Post by TickTick »

Hello!

I have un-disabled all events (keyboard, mouse, etc.).

Nevertheless I still don't get any events if the user changes the CaretDate.

Did I overlook something?

Thank you.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Calendar does not "throw" any events

Post by TiKu »

Hi,

you should not need to enable any event in order to get notified when the user clicks a date. The SelectionChanged event should be fired then and this event can't be disabled.
Does the Events sample work for you? It writes a log message whenever an event is fired. If it doesn't work, then please tell me which version of Windows you are using and how you have configured the control.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Alantar
Cadet
Posts: 7
Joined: 23 Aug 2012, 16:22

Re: Calendar does not "throw" any events

Post by Alantar »

Hmm, I get the same behaviour here. No events get fired, neither for the control itself nor for an Object variable declared WithEvents.

I'm on Windows XP SP3, Access 2007 SP2.

Regards,
Oliver
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Calendar does not "throw" any events

Post by TiKu »

Open the control's property pages and make sure that the events that you want to use are enabled (property DisabledEvents).
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Alantar
Cadet
Posts: 7
Joined: 23 Aug 2012, 16:22

Re: Calendar does not "throw" any events

Post by Alantar »

I did some more tests.

I did try enabling all events. I also tried the ANSI and Unicode versions of the controls. There is no difference.
The Events I want are not listed in the enumerations to disable events anyway. I would like to react to "GetBoldDates" and "SelectionChanged". These Events are not fired.

The "Click" Event, however, is fired correctly when enabled.

Your Events-Sample works as inteded and logs the SelectionChanged-Event after the Click-Event. It seems there is a difference between VB6 and Access2007.

Some more things:
KeyUp and KeyDown work, KeyPress does not. All of them work in the Events-Sample.
I also tried the "MultipleCalenders"-Sample, but it just says "This smaple requires version 6.10 or newer of comctl32.dll". The version i have is 5.82.

I hope that will help to pinpoint the problem.

Regards,
Oliver
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Calendar does not "throw" any events

Post by TiKu »

I have to admit that I do not officially support MS Office, because I do not own a license of it. At my working place I have Office 2010, but of course I cannot work on hobby projects during work.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Calendar does not "throw" any events

Post by TiKu »

Before leaving work, I did a quick test with Excel 2010 (we don't have Access installed). I placed the Calendar control onto a user form and added a method for the SelectionChanged event. The event was fired correctly and there were no bold dates.
Does it work for you with Excel 2007? If not, please send me an Excel file that demonstrates the sample and I'll check it with Excel 2010.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Alantar
Cadet
Posts: 7
Joined: 23 Aug 2012, 16:22

Re: Calendar does not "throw" any events

Post by Alantar »

I tried the control with Excel and it works perfectly. So the problem seems to be with Access. I know that Access handles the Forms a little different than Excel. The behaviour of Excel-Forms seems to be a lot closer to VB6 than what Access does. I will see if I can make do with some workarounds as I would really like to get rid of the Calendar in the CommonControls.

Still thanks for your effort! I will try out some more of your controls, too and report my findings.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Calendar does not "throw" any events

Post by TiKu »

If I had MS Access, I could help you. I'm afraid that without changes to the code there's no way to make it work in Access.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply