MS Calendar Control


© Maxim Karetnikov

MS Calendar Control is a very convenient visual tool to display or choose a date including year, month, calendar day, and day of week.It is visible both at design time and at run time. Users might customize this control in many ways by combining its properties. The basic properties are given in Table 1. You can use the methods, events, and properties of the Calendar control to:

  • Display a calendar for any month of any given year.
  • Store a date selected by the user in the current record.
  • Trigger an action from an event based on the current date value.

Table 1.

Property

Description

progID MSacal70.ocx
ClassID 8E27C92B-1264-101C-8A2F-040224009C02
Backcolor Background color
Day Set or return a day
DayFont Set or return a font to display day
DayFontColor Set or return a color for day font
FirstDay Set or return a first day for the DAY OF WEEK colomn
GridCellEffect 2 is for 3D, 1 is for plane appearance of grid
GridFont Set or return a font for grid cell
GridFontColor Set or return a color for grid font
Height Height of control
month Set or return a month
ShowDateSelector Turn on or off the date selector (true- on, false- off)
ShowDay Turn on or off the Day (true- on, false- off)
ShowTitle Turn on or off the Title (true- on, false- off)
Year Set or return an year
Width Width of control

As a developer, you can use the methods associated with a custom control to manipulate that control. For example, you can use the Refresh method of the Calendar control to repaint the calendar. You can use the events associated with a control to update the control or to synchronize the control with a selected record, section, or environment. For example, you can use the Click event for the Calendar control to start a procedure that retrieves the specified date and sets the value of a control on

Go To Page: 1 2


The copyright of the article MS Calendar Control in VB Script is owned by . Permission to republish MS Calendar Control in print or online must be granted by the author in writing.

Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo