ctl32_monthcalendar
Links
MSDN .NET System.Windows.Forms.MonthCalendar
Overview
This visual class provides a monthcalendar control that can be used in VFP9. This class uses the Windows API to create a true Windows Common Controls monthcalendar.
Class Hierarchy
ctl32ctl32_controlbase ctl32_monthcalendar In the .NET monthcalendar control you can select a range of dates, but since this feature has a bug that makes selected dates invisible in Windows XP, this feature has been disabled in this class. With this bug, the ability to select a range of dates is totally useless. From MSDN docs: "Using the MonthCalendar with visual styles enabled will cause a selection range for the MonthCalendar control to not paint correctly..." The ctl32_monthcalendar control's appearance is highly configurable. By default, today's date is displayed as circled, and is also noted at the bottom of the grid. You can change this feature by setting the ctlShowToday and ctlShowTodayCircle properties to false. You can also add week numbers to the calendar by setting the ctlShowWeekNumbers property to true. By setting the ctlCalendarDimensionsWidth and ctlCalendarDimensionsHeight properties, you can have multiple months displayed horizontally and vertically. By default, Sunday is shown as the first day of the week, but any day can be designated using the ctlFirstDayOfWeek property. You can also set certain dates to be displayed in bold on a one-time basis, annually, or monthly, by using the ctlAddBoldedDate, ctlAddAnnuallyBoldedDate, and ctlAddMonthlyBoldedDate methods. The earliest and latest dates the user can select are determined by the ctlMaxDate and ctlMinDate properties. The minimum date that can be selected is {^1800,1,1} to prevent problems with the GoMonth function that only works for dates after 1753. The maximum date that can be selected is {^9998,12,31}. To change the month calendar's color scheme, set properties such as ctlTitleBackColor, ctlTitleForeColor and ctlTrailingForeColor. The ctlTitleBackColor property also determines the font color for the days of the week. The ctlTrailingForeColor property determines the color of the dates that precede and follow the displayed month or months. To display the current date at the bottom of the control set the ctlShowToday property to true. To display week numbers set the ctlShowWeekNumbers property to true. You can set this property either in code or in the Properties window. Week numbers appear in a separate column to the left of the first day of the week. The ctl32_monthcalendar control can display up to 12 months at a time. By default, the control displays only one month, but you can specify how many months are displayed and how they are arranged within the control. When you change the calendar dimensions, the control is resized, so be sure there is enough room on the form for the new dimensions. To display multiple months Set the ctlCalendarDimensionsWidth and ctlCalendarDimensionsHeight properties to the number of months to display horizontally and vertically. The ctlBoldedDates array property contains single dates. The ctlAnnuallyBoldedDates array property contains dates that appear in bold every year. The ctlMonthlyBoldedDates array property contains dates that appear in bold every month. Ths ctlWeeklyBoldedDates array property contains dates that appear bold everyweek. Each of these read only properties contains an array of Dates. To add a date to one of these lists you should use the ctlAddAnnuallyBoldedDate, ctlAddMonthlyBoldedDate, ctlAddWeeklyBoldedDate, ctlAddBoldedDate methods. To remove a date from one of these lists, you must use the ctlRemoveAnnuallyBoldedDate, ctlRemoveMonthlyBoldedDate, ctlRemoveWeeklyBoldedDate, ctlRemoveBoldedDate methods. To remove all dates from one of these lists, you must use the ctlRemoveAllAnnuallyBoldedDates, ctlRemoveAllMonthlyBoldedDates, ctlRemoveAllWeeklyBoldedDates, ctlRemoveAllBoldedDates methods. | |
This is a mirror of what was originally at www.ctl32.com.ar by CARLOS ALLOATTI, rescued by the webarchive.org - Fantastic VFP Classes, like the CTL32 ActiveX: Scrollable container, BalloonTip, ScrollBars, DatePicker, FormState, Gripper, ProgressBar, StatusBar, TrackBar, Animation, ContextMenu, Month Calendar, Raw Print, Registry, SizeBox, FormState, FTP, LibCurl
Ctl32 MonthCalendar
Subscribe to:
Posts (Atom)
No comments:
Post a Comment