Thanks Radikal, ur solution works but not actactly as i want.
I got the solution -
Y := FCalender.ScreenToClient(M
if Y > 43 then begin
SetValue(FCalender.Date);
FCalender.Visible := False;
end;
Main Topics
Browse All TopicsI need to hide the month calender when user clicks on it and store the date in a variable. Now when user clicks on the buttons < & > to change the month i don;t want to hide the Monthcalender.
How can i know whether user has clicked on the buttons or on the calender to select the date.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The answer is to use the following:
USES CommCtrl
procedure TForm1.MonthCalendarClick(
var C : TMCHitTestInfo;
begin
C.cbSize := SizeOf(C);
C.pt := MonthCalendar.ScreenToClie
MonthCal_HitTest(MonthCale
IF (C.uHit or MCHT_CALENDARDATE) = MCHT_CALENDARDATE THEN
BEGIN
Hey you clicked on a date and nothing else !!!
END;
end;
Justin
Business Accounts
Answer for Membership
by: RadikalQ3Posted on 2005-06-24 at 04:49:30ID: 14292657
Place this code into the OnGetMonthInfo:
nthInfo(Se nder: TObject;
(Sender: TObject);
procedure TForm1.MonthCalendar1GetMo
Month: Cardinal; var MonthBoldInfo: Cardinal);
begin
(Sender as TMonthCalendar).Tag:=1;
end;
and this other in the OnClick event:
procedure TForm1.MonthCalendar1Click
var
i : integer;
begin
if (Sender as TMonthCalendar).Tag=0 then (Sender as TMonthCalendar).Hide;
(Sender as TMonthCalendar).Tag:=0;
end;
This works... but, in my opinion, is better put an external button with caption 'Ok' or similar...