The
Figure 9-1 shows the calendar control inside a modal dialog box.
Figure 9-1: The calendar control in use.
The calendar control comes with a help file that lists the control's properties, methods, and events, as shown in Table 9-1.
Properties |
Methods |
Events |
---|---|---|
BackColor |
AboutBox |
AfterUpdate |
Day |
NextDay |
BeforeUpdate |
DayFont |
NextMonth |
Click |
DayFontColor |
NextWeek |
DblClick |
DayLength |
NextYear |
KeyDown |
FirstDay |
PreviousDay |
KeyPress |
GridCellEffect |
PreviousMonth |
KeyUp |
GridFont |
PreviousWeek |
NewMonth |
GridFontColor |
PreviousYear |
NewYear |
GridLinesColor |
Refresh | |
Month |
Today | |
MonthLength | ||
ShowDateSelectors | ||
ShowDays | ||
ShowHorizontalGridlines | ||
ShowTitle | ||
ShowVerticalGridlines | ||
TitleFont | ||
TitleFontColor | ||
Value | ||
ValueIsNull | ||
Year |
You'll be using the BackColor, Day, Month, Year, and Value properties in the Ex09a example later in this chapter. BackColor is an unsigned long, but it is used as an OLE_COLOR, which is almost the same as a COLORREF. Day, Month, and Year are short integers. Value's type is the special type VARIANT, which is described in Chapter 25. It holds the entire date as a 64-bit value.
Each of the properties, methods, and events listed in the table has a corresponding integer identifier. Information about the names, types, parameter sequences, and integer IDs is stored inside the control and is accessible to Visual Studio .NET at container design time.