Control Calendar Stephen Lebans

  • Thread starter Thread starter Principiante
  • Start date Start date
P

Principiante

Well, first of all, pardon for my English.

I have downloaded the Control Calendar version 2000 from Stephen Lebans
web page (a great page of access) and I want to do one thing and I can't.

With the control calendar you can select a date and put it in a control
but I want, and I don't know what to do this, to know what is the
current selected date when you move with the arrow keys, page down... in
the control calendar.

My idea, is when you are moving for the dates, get the the date and show
in a control a value without select a date with the mouse and closing
the control calendar.

I have seen in the code the case when you press the arrow keys and I
have write:

MsgBox mc.EndSelectedDate but it doesn't work.
MsgBox mc.localEndSelectedDate but it doesn't work.
MsgBox EndDate but it doesn't work.

In all of the msgbox, the date is 0:00:00.

Thank you for your comments.

Principiante. Spain.
 
The control does not expose any events. There is no date actually
selected when you use the Keyboard to move around the control but I
could process the MCN_SELCHANGE message. THe problem is that the
Calendar is run in a modal loop so even if I updated a property in the
MonthCalendar class, or raised an event, the calling Form would not be
able to update it's display because it is effectively disabled. This is
the GUI that the overwhelming majority of users prefer so I am not
willing to change this logic.
S\orry I cannot accomodate your request, If you are into programming the
code is already in place to handle the MCN_SELCHANGE event. You could
comment out the code that Disables all of the windows of the Access App
and then raise an event in the MonthCalendar class.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thnk you for your comment and pardon for my English.

I understand that yo say. I have obtained the actually selected date
when I move around the control making a function (this is not a good
function but it works). Can I move the focus to the form, make
operations and return the focus to the calendar? Is it possible?

You comment in the ShowMonthCalendar function:
'In order for this function to return Focus to the calling Form properly
' you must pass the Optional var hWndForm

I don´t know how to do this. API is so much dificult to me.

Thanks for any comment.

Principiante. Spain.


Stephen Lebans escribió:
 
You would have to ENable the Access App main window and then the calling
Form before you can set focus to the Form. The code to do so is already
in the ShowMonthCalendar function right at the very end,

I'm afraid it would take me too long to try to explain to you how to do
everything you are looking to do. Perhaps you could find a local
programmer to have a look at it for you.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
With this code:

lngRet = EnableWindow(Application.hWndAccessApp, 1)
SetFocus mc.hwndForm

I have "returned the focus" to the form but I can't use the form events
(on got focus...) to put the date in a control.

I had thought to return the focus to the form, put the date in the
control and return the focus to the calendar but ....

Well, I believe that it isn't possible to be done.

Principiante. Spain.

Principiante escribió:
 
Thanks for all. I will prove to do it and I will ask in the Spanish
group of ACCESS.

Thanks again for your interest.

Principiante. Spain.


Stephen Lebans escribió:
 
Back
Top