DateChanged

Description

Occurs immediately after a date is selected.

Event ID

Event ID

Objects

pbm_mcdatechanged

MonthCalendar

Arguments

None

Returns

Long. Return code: Ignored

Usage

If you code a call to a MessageBox function in this event, the message box does not display if the user selects a new date using the mouse. This is because the mouse click captures the mouse. Message boxes do not display when the mouse is captured because unexpected results can occur. The message box does display if the user selects a new date using the arrow keys.

SetSelectedDate and SetSelectedRange trigger a DateChanged event. You should not call either method in a DateChanged event, paticularly using the Post method.

See also