lebans monthcalendar usage

  • Thread starter Thread starter Malcolm Cook
  • Start date Start date
M

Malcolm Cook

I have a macro (bound to ctrl-shift-f2, by the way) which, if it figures out
that the screen.activecontrol is bound to a date field, opens a calendar to
edit it.

It works grand.

However, now I want to replace the calendar with lebans' monthcalendar.

My problem is that the examples of its use require that each form from which
it gets called declare its own instance of the calendar and set the new
instance's hWnd to that of the current form.

I've tried creating a global instance of clsMonthCal and dynamically set its
hwnd prior to each use but I crash on first use.

Any suggestions / direction for me?

Thanks!

Malcolm
 
The MonthCalendar class was designed to be called directly from a Form.
If for whatever reasons you need a global instance of the class then
create a seperate "calendar" form containing the single instance of the
MonthCalendar class. Set this form's Visible prop as required and call
the MonthCalendar class's methods via this form.


--

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top