>The help files for MSCal.ocx alludes to being able to set the controlsource for the calander control to a field and binding that field to the calander.
>
>I can't seem to find a controlsource property for the control. Is there really one and if so, where did they hide it?
>
>I have a program that calculates local sunrise, sunset, moonrise and moonset for any given location. I'd like to be able to display this information on the calander control but I can't seem to find a way to do it.
>
>Any ideas?
The answer could depend on the VFP version and Calendar version you use. In general, what I did was to create a sublcass of the calendar and added a ControlSource property. I then had to put code in the refresh and lostfocus methods to handle setting of the calendar properties. The calendar has 3 properties to set the value of the date - month, day and year. e.g. This.oleCalendar.Month = month(datefieldname), etc. Of course, you would get the DateFieldName from whatever you put in the ControlSource property.
Hope this gets you started in the right direction.
Mark McCasland
Midlothian, TX USA