Control - Month View

images\btn_ctrl_monthview.gif An easy way to view and set date information using monthly calendars. Can select one or multiple dates or show up to 12 months at a time.

 

Properties

 

In addition to the properties listed below, a Control tab provides access to certain frequently used form properties for this control. See the Form Properties topic for information on those properties.

 

 

MonthView

General

 

Value

Date expression that is the default property of the control. Set a default date, if desired.

MinDate

Date expression setting lower boundary of the calendar.

MaxDate

Date expression setting upper boundary of the calendar.

StartOfWeek

Day of the week to use to start each week.

MousePointer

The type of mouse pointer displayed when over the MonthView. Choose from 16 different types plus a custom pointer

OLEDropMode

Set to None (default) if the MonthView does not accept OLE drops and is to display the No Drop cursor if an OLE drop is attempted. Set to Manual, the MonthView will trigger OLE drop events, allowing programs to handle the OLE drop operation in code.

BorderStyle

FixedSingle (default) or None. None may be used with Flat Appearance to achieve an uncaptioned rectangle of background color.

Appearance

3D or Flat. 3D is the standard Windows look. Flat results in a rectangular square of background color with a foreground color border.

ShowWeekNumbers

Show week number (week position in year) along left column border.

MultiSelect

Whether or not user can make multiple selections from the MonthView.

Enabled

True or False. True means the object can respond to user-generated events, false prevents it from responding.

ShowToday

True to show "Today is" date line at bottom of calendar.

MonthRows

How many rows to use to show multiple months.

MonthColumns

How many columns to use to show multiple months.

ScrollRate

The number of months that are scrolled when user clicks a month scroll button. Allows scrolling of more than one month at a time, so if four months are displayed an even four months at a time can be scrolled.

MaxSelCount

Valid when MultiSelect is True. Sets the maximum number of contiguous days that can be selected at once.

 

 

Font

 

Properties

Font properties that may be changes.

Font

Choose a font installed on this system. It's wise to choose standard Windows fonts such as MS Sans Serif that are universally available.

Size

Size of font, in points. The size of the font sets the size of the drop down portion of this control.

Effects

Bold, Italic, Underline or Strikeout.

Sample Text

A preview of the selected settings.

 

 

Color

 

BackColor

Color to be used for the MonthView's background.

ForeColor

Color to be used for the MonthView's foreground, the color of the text caption.

MonthBackColor

Background color for months.

TitleBackColor

Customize calendar title background color.

TitleForeColor

Customize calendar title foreground color.

TrailingForeColor

Color of dates that preceded and follow the displayed month or months.

Color Set

Choose from Standard Colors (standard Windows non-dithered colors) or Windows System Colors. The latter will be defined by the user's Control Panel settings and is normally the setting used so that the form changes appearance like the rest of Windows if the Control Panel settings are changed.

Color Palette

Displays available colors. Click on the property to be changed to highlight it in the Properties pane, click on the desired color in the Color Palette pane and then press Apply.

Edit Custom Color

Change the custom color presented in the Color Palette when the Color Set is set to Windows System Colors.

 

 

Picture

 

MouseIcon

Custom icon to use when the MousePointer property is set to 99. Like Visual Basic, will not load animated cursor (.ani) files.

 

Custom Date and Time Formats

 

The CustomFormat property of the MonthView allows specifying fully custom formats for dates and times that can intermingle regular text and the following special format characters within the mast string.

 

d

One- or two-digit day.

dd

Two-digit days with single digits prefixed with 0.

ddd

Three-character abbreviated weekday.

dddd

Full weekday name.

h

One- or two-digit hour in 12-hour format.

hh

Two-digit hour in 12-hour format with single digit hours prefixed with 0.

H

One- or two digit hour in 24-hour format.

HH

Two-digit hour in 24-hour format with single digit hours prefixed with 0.

m

One- or two-digit minute.

mm

Two-digit minutes with single digits prefixed with 0.

M

One- or two-digit month number.

MM

Two-digit month numbers with single digits prefixed with 0.

MMM

Three-character month name abbreviation.

MMMM

Full month name.

s

One- or two-digit second.

ss

Two-digit seconds with single digits prefixed with 0.

t

One-letter AM/PM abbreviation: either "A" or "P"

tt

Either "AM" or "PM"

X

A callback field. The control fills in all other fields and then asks the owner how to fill in the portion with "X" characters. Use different numbers of X's (like, XX or XXXX for different call back fields in the same mask string).

y

The last digit of the year.

yy

The last two digits of the year.

yyy

The full year.

 

Example:

 

"'The date is 'ddddMMMMdd, yyy ' and the time is 'h:mtt"

 

Will result in dates such as:

 

"The date is Friday February 04, 2000 and the time is 3:34 PM"

 

Callbacks are used with format strings like "dddd XX " to see what should be put in the XX based on what is in the dddd, for example to substitute the XX with a non-English day name in addition to the English name. If the dddd is "Wednesday" you could write the appropriate non-English name for the target audience. Consult a good VB reference text for use of callbacks with this control.

 

Note: Individual days can have their day number boldfaced at run time to emphasize holidays, etc.