Page 1 of 1

Calendar Control shows random dates as bold

Posted: 23 Aug 2012, 16:30
by Alantar
Hi Timo

Very nice work on your controls. We are just evaluating them for use in our project and I started with the Calendar Control.
I'm on Windows XP SP3 and Access 2007 SP2

The Calendar Control shows up on my forms and can be read and written to (.Value). But after each opening of the form, random dates are shown in bold, others are not. I can do .SetboldDates on the Calendar if I do this in a Button event handler. It doesn't help to do that in the Form_Load().

Regards,
Oliver

Re: Calendar Control shows random dates as bold

Posted: 23 Aug 2012, 22:13
by TiKu
Hi,

I'll have a look at this during the weekend. As far as I remember, Windows XP has a bug regarding bold dates, but I may be wrong. Also I don't remember the exact conditions that trigger the bug.

Regards
TiKu

Re: Calendar Control shows random dates as bold

Posted: 24 Aug 2012, 09:55
by Alantar
If I could react to the GetBolddates-Event, I could reset the bold dates there every time. But see the problem in the other post...

We will get some Win7 machines here in the next weeks. I will try there if it works better and let you know.

Regards (and thanks for looking into this)
Oliver

Re: Calendar Control shows random dates as bold

Posted: 24 Aug 2012, 14:53
by TiKu
I had a quick look at the sourcecode this morning and found a hack that I've implemented 3 years ago. The comment said that Windows sets random dates to bold on control creation. I used a timer to explicitly clear the bold dates after control creation. This works fine if you use the control within VB6, but apparently not within MS Office.

Re: Calendar Control shows random dates as bold

Posted: 27 Aug 2012, 07:45
by Alantar
It's sad that Access is so bad with COM-Controls, but it seems there is nothing your control can do about that. The idea of using a timer is really nice. I will try to implement that from the Access side. It wouldn't be the worst hack we have to do to make Access comply :)

Thanks for the idea!

Oliver