MonthCalendar (MonthCal)

MonthCal - Methods & Properties
NewMonthCal
Creates a new MonthCal and returns the handle of the new control.
| hWnd of parent form (or frame) or placeholder (hWnd) | |
| Specifies the style of the window being created. | |
| If the style PC_PLACEHOLDER is specified, then hWnd refers to the control to be used as a as placeholder. The new MonthCal control will be placed on the form at the same location as this control. The place-holder control is then hidden. Note: If PC_PLACEHOLDER style is not given, then hWnd specifies the parent window for the new control. The new control is positioned according to the current values of PPCtrl.Left, PPCtrl.Top, PPCtrl.Width and PPCtrl.Height. |
MC1 = PPCtrl.MonthCal(Frame1.hWnd, WS_BORDER + DTS_TIMEFORMAT, 0)
Date
Retrieves/Sets the currently selected time from the month calendar control specified by hWnd.
SelDate=PPCtrl.Date(MC1)
MinDate, MaxDate
Retrieves/Sets the current minimum and maximum allowable times/dates for the month calendar control specified by hWnd.
PPCtrl.MaxDate(MC1) = DateSerial(2099,12,31)
FromDate = PPCtrl.MinDate(MC1)
FirstDayOfWeek
int = PPCtrl.FirstDayOfWeek(hWnd)
Retrieves the first day of the week of the month calendar control specified by hWnd.
Value |
Day |
0 |
Monday |
1 |
Tuesday |
2 |
Wednesday |
3 |
Thursday |
4 |
Friday |
5 |
Saturday |
6 |
Sunday |
MaxSelCount
Int=PPCtrl.MaxSelCount(hWnd)
Sets the maximum number of days that can be selected in the month calendar control specified by hWnd. Default 7 days. Only valid with window style MCS_MULTISELECT.
DateSelMax, DateSelMin
PPCtrl.DateSelMax(hWnd) = Date
Date = PPCtrl.DateSelMin(hWnd)
Date = PPCtrl.DateSelMin(hWnd)
Sets the selection for the month calendar control specified by hWNd to a given date range. Only valid valid with window style MCS_MULTISELECT. If the date range specified exceeds the number of days set in PPCtrl.MaxSelCount, the range will be automatically adjusted.
PPCtrl.DateSelMax(MC1)=DateSerial(2003,02,12)
MonthCal – Styles
MCS_MULTISELECT
The month calendar will allow the user to select a range of dates within the control. By default, the maximum range is one week. You can change the maximum range that can be selected by using the PPCtrl.MaxSelCount property
MCS_NOTODAY
The month calendar control will not display the "today" date at the bottom of the control.
MCS_NOTODAYCIRCLE
The month calendar control will not circle the "today" date.
MCS_WEEKNUMBERS
The month calendar control will display week numbers (1-52) to the left of each row of days. Week 1 is defined as the first week that contains at least four days.
