Hi all,
I want the MonthCalendar- Component (Delphi 5) to react on Double- Clicking on a day with drawing it bold. Another Double- Click should turn it normal again. Shure it´s got to do with OnGetMonthInfo and BoldDays, but I just don´t get it ;)
Thanks !
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hi nurotic,

this should do it

Var MBI : LongWord = 0;

procedure TForm1.MonthCalendar1GetMonthInfo(Sender: TObject;
  Month: Cardinal; var MonthBoldInfo: Cardinal);
  MonthBoldInfo := MBI;

procedure TForm1.MonthCalendar1DblClick(Sender: TObject);
  Dt : TDate;
  y,m,d : Word;
  Dt := MonthCalendar1.Date;
  If (MBI and ($00000001 shl (D - 1))) <> 0 then
    MBI := MBI xor ($00000001 shl (D - 1))
    MBI := MBI or ($00000001 shl (D - 1));
  MonthCalendar1.Date := 0;  //Force Display;
  MonthCalendar1.Date := Dt;

meikl ;-)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nuroticAuthor Commented:
Ok. No more hesitations when it comes to using Bit-Operators. ;)
Thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.