GOA - System.Windows.Forms.MonthCalendar

MonthCalendar Class


Represents a standard Windows month calendar control.

Definition

public class MonthCalendar: Control

Members Table

MethodDescription
AddAnnuallyBoldedDateAdds a day that is displayed in bold on an annual basis in the MonthCalendar.
AddBoldedDateAdds a day to be displayed in bold in the MonthCalendar.
AddMonthlyBoldedDateAdds a day that is displayed in bold on a monthly basis in the MonthCalendar.
BringToFrontBrings the control to the front of the z-order. (Inherited from Control)
ContainsReturns a value indicating whether the specified control is a child of the control. (Inherited from Control)
CreateControlForces the creation of the control, including the creation of the handle and any child controls. (Inherited from Control)
CreateControlSkinCreates the skin for the Control. (Inherited from Control)
CreateControlSkinInstanceOverriden. Creates a ControlSkin instance for the MonthCalendar.
CreateControlsInstanceCreates a new instance of the control collection for the control. (Inherited from Control)
CreateHandleCreates a handle for the control. (Inherited from Control)
DestroyHandleDestroys the handle associated with the control. (Inherited from Control)
DisposeOverloaded. Releases all resources used by the MonthCalendar.
EqualsOverloaded. Compares two objects to determine if they are equal. (Inherited from Object)
FindFormReturns the form that the control is on. (Inherited from Control)
FocusSets input focus to the control. (Inherited from Control)
GetChildAtPointReturns the child control that is located at the specified coordinates. (Inherited from Control)
GetContainerControlReturns the next ContainerControl up the control's chain of parent controls. (Inherited from Control)
GetDateStringGets the String representation of a specified date.
GetDisplayRangeRetrieves the date selection range of the MonthCalendar.
GetHashCodeServes as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object)
GetNextControlReturns the next control forward or back in the tab order of child controls. (Inherited from Control)
GetStyleReturns the value of the specified control style bit for the control. (Inherited from Control)
GetTitleStringGets the String representation of a date specified by its month and year.
GetTopLevelDetermines if the control is a top-level control. (Inherited from Control)
GetTypeGets the Type of the current instance. (Inherited from Object)
HideHides the control from the user. (Inherited from Control)
HitTestOverloaded. Determines which component of the MonthCalendar is at a specified location.
InitLayoutInitializes the layout state of the control after it has been added to another container. (Inherited from Control)
InternalMethodInherited from Control.
InvalidateOverloaded. Invalidates the control. This will cause a paint event to be sent later to the control. (Inherited from Control)
InvokeGotFocusRaises the GotFocus event for the specified control. (Inherited from Control)
InvokeLostFocusRaises the LostFocus event for the specified control. (Inherited from Control)
InvokeOnClickRaises the Click event for the specified control. (Inherited from Control)
InvokePaintRaises the Paint event for the specified control. (Inherited from Control)
InvokePaintBackgroundInvoke the Control.OnPaintBackground method for the specified control. (Inherited from Control)
IsInputCharDetermines if a character is an input character that the control recognizes. (Inherited from Control)
IsInputKeyOverriden. Determines whether the specified key is a regular input key or a special key that requires preprocessing.
IsMnemonicDetermines if the specified character is the mnemonic character assigned to the control in the specified string. (Inherited from Control)
MonthCalendarInitializes a new instance of MonthCalendar.
OnBackColorChangedRaises the BackColorChanged event. (Inherited from Control)
OnCausesValidationChangedRaises the CausesValidationChanged event. (Inherited from Control)
OnClickRaises the Click event. (Inherited from Control)
OnClientSizeChangedInherited from Control.
OnControlAddedRaises the ControlAdded event. (Inherited from Control)
OnControlRemovedRaises the ControlRemoved event. (Inherited from Control)
OnCreateControlOverriden. Raises the CreateControl event.
OnCursorChangedRaises the CursorChanged event. (Inherited from Control)
OnDateChangedRaises the DateChanged event.
OnDateSelectedRaises the DateSelected event.
OnDockChangedRaises the DockChanged event. (Inherited from Control)
OnDoubleClickRaises the DoubleClick event. (Inherited from Control)
OnEnabledChangedRaises the EnabledChanged event. (Inherited from Control)
OnEnterRaises the Enter event. (Inherited from Control)
OnFontChangedOverriden. Raises the FontChanged event.
OnForeColorChangedRaises the ForeColorChanged event. (Inherited from Control)
OnGotFocusRaises the GotFocus event. (Inherited from Control)
OnHandleCreatedOverriden. Raises the HandleCreated event.
OnHandleDestroyedOverriden. Raises the HandleDestroyed event.
OnKeyDownOverriden. Raises the KeyDown event.
OnKeyPressRaises the KeyPress event. (Inherited from Control)
OnKeyUpRaises the KeyUp event. (Inherited from Control)
OnLayoutRaises the Layout event. (Inherited from Control)
OnLeaveRaises the Leave event. (Inherited from Control)
OnLocationChangedRaises the LocationChanged event. (Inherited from Control)
OnLostFocusRaises the LostFocus event. (Inherited from Control)
OnMouseDownOverriden. Raises the MouseDown event.
OnMouseEnterRaises the MouseEnter event. (Inherited from Control)
OnMouseLeaveOverriden. Raises the MouseLeave event.
OnMouseMoveOverriden. Raises the MouseMove event.
OnMouseUpOverriden. Raises the MouseUp event.
OnMouseWheelRaises the MouseWheel event. (Inherited from Control)
OnMoveRaises the Move event. (Inherited from Control)
OnNCPaintOccurs when the non-client area of the control needs to be redrawn. (Inherited from Control)
OnPaintOverriden. Raises the Paint event.
OnPaintBackgroundPaints the background of the control. (Inherited from Control)
OnParentChangedRaises the ParentChanged event. (Inherited from Control)
OnParentEnabledChangedRaises the EnabledChanged event when the Enabled property value of the control's container changes. (Inherited from Control)
OnParentVisibleChangedRaises the VisibleChanged event when the Visible property value of the control's container changes. (Inherited from Control)
OnResizeRaises the Resize event. (Inherited from Control)
OnSizeChangedRaises the SizeChanged event. (Inherited from Control)
OnSkinChangedRaises the SkinChanged event. (Inherited from Control)
OnStyleChangedRaises the StyleChanged event. (Inherited from Control)
OnTabIndexChangedRaises the TabIndexChanged event. (Inherited from Control)
OnTabStopChangedRaises the TabStopChanged event. (Inherited from Control)
OnTextChangedRaises the TextChanged event. (Inherited from Control)
OnValidatedRaises the Validated event. (Inherited from Control)
OnValidatingRaises the Validating event. (Inherited from Control)
OnVisibleChangedRaises the VisibleChanged event. (Inherited from Control)
PerformLayoutOverloaded. Forces the control to apply layout logic to all its child controls. (Inherited from Control)
PointToClientComputes the location of the specified screen point into client coordinates. (Inherited from Control)
PointToScreenComputes the location of the specified client point into screen coordinates. (Inherited from Control)
ProcessDialogCharProcesses a dialog character. (Inherited from Control)
ProcessDialogKeyProcesses a dialog key. (Inherited from Control)
ProcessMnemonicProcesses a mnemonic character. (Inherited from Control)
RecreateHandleForces the re-creation of the handle for the control. (Inherited from Control)
RectangleToClientComputes the size and location of the specified screen rectangle in client coordinates. (Inherited from Control)
RectangleToScreenComputes the size and location of the specified client rectangle in screen coordinates. (Inherited from Control)
ReferenceEqualsDetermines whether the specified Object instances are the same instance. (Inherited from Object)
RefreshForces the control to invalidate its client area and immediately redraw itself and any child controls. (Inherited from Control)
RemoveAllAnnuallyBoldedDatesRemoves all the annually bolded dates.
RemoveAllBoldedDatesRemoves all the nonrepetitive bolded dates.
RemoveAllMonthlyBoldedDatesRemoves all the monthly bolded dates.
RemoveAnnuallyBoldedDateRemoves the specified date from the list of annually bolded dates.
RemoveBoldedDateRemoves the specified date from the list of nonrepetitive bolded dates.
RemoveMonthlyBoldedDateRemoves the specified date from the list of monthly bolded dates.
ResetBackColorResets the BackColor property to its default value. (Inherited from Control)
ResetCursorResets the Cursor property to its default value. (Inherited from Control)
ResetFontResets the Font property to its default value. (Inherited from Control)
ResetForeColorResets the ForeColor property to its default value. (Inherited from Control)
ResetSkinResets the Skin property to its default value. (Inherited from Control)
ResetTextResets the Text property to its default value. (Inherited from Control)
ResumeLayoutOverloaded. Resumes normal layout logic. (Inherited from Control)
SelectOverloaded. Activates the control. (Inherited from Control)
SelectNextControlActivates the next control. (Inherited from Control)
SendToBackSends the control to the back of the z-order. (Inherited from Control)
SetBoundsOverloaded. Sets the bounds of the control to the specified location and size. (Inherited from Control)
SetBoundsCorePerforms the work of setting the specified bounds of this control. (Inherited from Control)
SetCalendarDimensionsSets the number of columns and rows that compose the display of months of the MonthCalendar.
SetClientSizeCoreSets the size of the client area of the control. (Inherited from Control)
SetDateSets a date as the current selected date.
SetNCSizeCoreSets the non-client area of the control. (Inherited from Control)
SetSelectionRangeSets a date selection range in a MonthCalendar.
SetStyleSets the specified style bit to the specified value. (Inherited from Control)
SetTopLevelSets the control as the top-level control. (Inherited from Control)
SetVisibleCoreSets the control to the specified visible state. (Inherited from Control)
ShowDisplays the control to the user. (Inherited from Control)
SuspendLayoutTemporarily suspends the layout logic for the control. (Inherited from Control)
ToStringReturns a String that represents the current Object. (Inherited from Object)
UpdateCauses the control to redraw its client area if it was invalidated. (Inherited from Control)
UpdateBoldedDatesRepaints the bolded dates to reflect the dates set in the lists of bolded dates.
UpdateBoundsOverloaded. Updates the bounds of the control with the current size and location. (Inherited from Control)
UpdateZOrderUpdates the control in its parent's z-order. (Inherited from Control)
PropertyDescription
AnchorGets or sets which edges of the control are anchored to the edges of its container. (Inherited from Control)
AnnuallyBoldedDatesGets or sets the array of DateTime objects that determines which annual days are displayed in bold.
BackColorGets or sets the background color for the control. (Inherited from Control)
BackVisualGets the visual of the control. (Inherited from Control)
BoldedDatesGets or sets the array of DateTime objects that determines which nonrecurring dates are displayed in bold.
BottomGets the distance between the bottom edge of the control and the top edge of its container's client area. (Inherited from Control)
BoundsGets or sets the size and location of the control including its nonclient elements. (Inherited from Control)
CalendarDimensionsGets or sets the number of columns and rows that compose the display of months of the MonthCalendar.
CanFocusGets a value indicating whether the control can receive focus. (Inherited from Control)
CanSelectGets a value indicating whether the control can be selected. (Inherited from Control)
CaptureGets or sets a value indicating whether the control has captured the mouse. (Inherited from Control)
CausesValidationGets or sets a value indicating whether the control causes validation for any controls that require validation when it receives focus. (Inherited from Control)
ClientRectangleGets the rectangle that represents the client area of the control. (Inherited from Control)
ClientSizeGets or sets the height and width of the client area of the control. (Inherited from Control)
ContainerGets the IContainer that contains the Component. (Inherited from Component)
ContainsFocusGets a value indicating whether the control or one of its child controls currently has the input focus. (Inherited from Control)
ControlSkinGets the ControlSkin of the control. (Inherited from Control)
ControlsGets the collection of controls contained within the control. (Inherited from Control)
CreatedGets a value indicating whether the control has been created. (Inherited from Control)
CursorGets or sets the cursor which is displayed when the mouse pointer is over the control. (Inherited from Control)
DefaultBackColorGets the default background color of the control. (Inherited from Control)
DefaultFontGets the default font of the control. (Inherited from Control)
DefaultForeColorGets the default foreground color of the control. (Inherited from Control)
DefaultSizeOverriden. Gets the default size of the calendar.
DefaultSkinGets or sets the default skin of the control. (Inherited from Control)
DisplayRectangleGets the rectangle which represents the display area of the control. (Inherited from Control)
DisposingGets a value indicating whether the control is in the process of being disposed of. (Inherited from Control)
DockGets or sets which edge of the parent container a control is docked to. (Inherited from Control)
EnabledGets or sets a value indicating whether the control can react to user interaction. (Inherited from Control)
FirstDayOfWeekGets or sets the first day of the week as displayed in the MonthCalendar.
FocusedGets a value indicating whether the control has input focus. (Inherited from Control)
FontGets or sets the font of the text which is displayed by the control. (Inherited from Control)
ForeColorGets or sets the foreground color of the control. (Inherited from Control)
HandleGets the native handle that the control is bound to. (Inherited from Control)
HasChildrenGets a value indicating whether the control has one or more child controls. (Inherited from Control)
HeightGets or sets the height of the control. (Inherited from Control)
IsDisposedGets a value indicating whether the control has been disposed of. (Inherited from Control)
IsHandleCreatedGets a value indicating whether the control has a handle associated with it. (Inherited from Control)
LeftGets or sets the horizontal coordinate of a control's left edge. (Inherited from Control)
LocationGets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. (Inherited from Control)
MaskVisualGets the Visual which is the mask of the control. (Inherited from Control)
MaxSelectionCountGets or sets the maximum number of days that can be selected in the MonthCalendar.
ModifierKeysGets a value indicating when one of the modifier keys (SHIFT, CTRL, and ALT) is pressed. (Inherited from Control)
MonthlyBoldedDatesGets or sets the array of DateTime objects that determine which monthly days are displayed in bold.
MouseButtonsGets a value indicating when one of the mouse buttons is clicked. (Inherited from Control)
MousePositionGets the position of the mouse cursor in global coordinates. (Inherited from Control)
NCVisualGets the non-client visual element of the control. (Inherited from Control)
NameGets or sets the name of the control. (Inherited from Control)
OverlayVisualGets a visual placed over everything. (Inherited from Control)
ParentGets or sets the parent container of the control. (Inherited from Control)
ParkedGets a value indicating whether the control is parked. (Inherited from Control)
RecreatingHandleGets a value indicating whether the control is currently re-creating its handle. (Inherited from Control)
RightGets the distance between the right edge of the control and the left edge of its container. (Inherited from Control)
ScrollChangeGets or sets the scroll rate for a MonthCalendar.
SelectionEndGets or sets the end date of the selected range of dates.
SelectionRangeGets or sets the selected range of dates for a MonthCalendar.
SelectionStartGets or sets the start date of the selected range of dates.
ShowTodayGets or sets a value indicating whether the today's date has to be displayed at the bottom of the MonthCalendar.
ShowTodayCircleGets or sets a value indicating whether the today's date has to be circled in the MonthCalendar.
ShowWeekNumbersGets or sets a value indicating whether the MonthCalendar has to display week numbers. (1-52)
SingleMonthSizeGets the minimum size to display one month of the MonthCalendar.
SiteGets or sets the ISite of the Component. (Inherited from Component)
SizeGets or sets the height and width of the control. (Inherited from Control)
SkinGets or sets the skin of the control. (Inherited from Control)
SystemMenuGets or sets the SystemMenu of the control. (Inherited from Control)
TabIndexGets or sets the tab order of the control within its container. (Inherited from Control)
TabStopGets or sets a value indicating whether the user can use the TAB key to focus to the control. (Inherited from Control)
TagGets or sets the object that contains data about the control. (Inherited from Control)
TextGets or sets the text which is associated with the control. (Inherited from Control)
TitleBackColorGets or sets the background color of the title area of the MonthCalendar.
TitleForeColorGets or sets the foreground color of the title area of the MonthCalendar.
TodayDateGets or sets the value that is used by MonthCalendar as today's date.
TodayDateSetGets a value indicating whether the TodayDate property has been explicitly set.
TopGets or sets the vertical coordinate of the control's top edge. (Inherited from Control)
TopLevelControlGets the parent control that is not parented by another Windows Forms control. (Inherited from Control)
TrailingForeColorGets or sets the color of days in months that are not fully displayed in the control.
VisibleGets or sets a value indicating whether the control is visible. (Inherited from Control)
VisualGets the visual element of the control. (Inherited from Control)
WidthGets or sets the width of the control. (Inherited from Control)
EventDescription
BackColorChangedHandles the changes of the BackColor property. (Inherited from Control)
CausesValidationChangedHandles the changes of the CausesValidation property. (Inherited from Control)
ClickHandles the click event when the control is clicked. (Inherited from Control)
ClientSizeChangedInherited from Control.
ControlAddedHandles the addition of a new control when it is added to the Control.ControlCollection. (Inherited from Control)
ControlRemovedHandles the remove of a control from the Control.ControlCollection. (Inherited from Control)
CursorChangedHandles the changes of the Cursor property. (Inherited from Control)
DateChangedHandles the changes in the date selection in the MonthCalendar.
DateSelectedHandles the user explicit date selections.
DisposedAdds an event handler to listen to the Disposed event on the component. (Inherited from Component)
DockChangedHandles the changes of the Dock property. (Inherited from Control)
DoubleClickHandles the double-clicked event of the control. (Inherited from Control)
EnabledChangedHandles the changes of the Enabled property. (Inherited from Control)
EnterHandles the entered event of the control. (Inherited from Control)
FontChangedHandles the changes of the Font property. (Inherited from Control)
ForeColorChangedHandles the changes of the ForeColor property. (Inherited from Control)
GotFocusHandles the focus reception of the control. (Inherited from Control)
HandleCreatedHandles the creation of a handle for the control. (Inherited from Control)
HandleDestroyedHandles the control's handle which is in the process of being destroyed. (Inherited from Control)
KeyDownHandles the pressed key event when a key is pressed and the control has focus. (Inherited from Control)
KeyPressHandles the pressed key event when a key is pressed and the control has focus. (Inherited from Control)
KeyUpHandles the release key event when a key is released and the control has focus. (Inherited from Control)
LayoutHandles the changes of control when it should reposition its child controls. (Inherited from Control)
LeaveHandles the input focus when it leaves the control. (Inherited from Control)
LocationChangedHandles the changes of the Location property. (Inherited from Control)
LostFocusHandles the focus on the control when it loses focus. (Inherited from Control)
MouseDownHandles the mouse event when the mouse pointer is over the control and a mouse button is pressed. (Inherited from Control)
MouseEnterHandles the mouse event when the mouse pointer enters the control. (Inherited from Control)
MouseLeaveHandles the mouse event when the mouse pointer leaves the control. (Inherited from Control)
MouseMoveHandles the mouse event when the mouse pointer is moved over the control. (Inherited from Control)
MouseUpHandles the mouse event when the mouse pointer is over the control and a mouse button is released. (Inherited from Control)
MouseWheelHandles the mouse event when the mouse wheel moves while the control has focus. (Inherited from Control)
MoveHandles the motion of the control when it is moved. (Inherited from Control)
PaintHandles the paint event of the control when it is redrawn. (Inherited from Control)
ParentChangedHandles the changes of the Parent property. (Inherited from Control)
ResizeHandles the size changes of the control when it is resized. (Inherited from Control)
SizeChangedHandles the changes of the Size property. (Inherited from Control)
SkinChangedHandles the changes of the Skin property. (Inherited from Control)
StyleChangedHandles the changes of the control style. (Inherited from Control)
TabIndexChangedHandles the changes of the TabIndex property. (Inherited from Control)
TabStopChangedHandles the changes of the TabStop property. (Inherited from Control)
TextChangedHandles the changes of the Text property. (Inherited from Control)
ValidatedHandles the validation of the control when it is finished validating. (Inherited from Control)
ValidatingHandles the validation of the control when it is validating. (Inherited from Control)
VisibleChangedDetermines the value of the VScroll property. (Inherited from Control)

Inheritance Hierarchy

Object
Component
Control
MonthCalendar

Examples

// This sample shows how to create and use a MonthCalendar instance.

 

using System;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

 

namespace SimpleMonthCalendar

{

     public class Form1 : System.Windows.Forms.Form

     {

          private System.Windows.Forms.MonthCalendar monthCalendar1= null;

          private System.Windows.Forms.Label label1= null;

          private System.Windows.Forms.Label label2= null;

 

          public Form1()

          {

               InitializeComponent();

          }

 

          private void InitializeComponent()

          {

               this.monthCalendar1 = new System.Windows.Forms.MonthCalendar();

               this.label1 = new System.Windows.Forms.Label();

               this.label2 = new System.Windows.Forms.Label();

               this.SuspendLayout();

 

               // monthCalendar1

               this.monthCalendar1.Location = new System.Drawing.Point(10, 10);

               this.monthCalendar1.DateChanged += new DateRangeEventHandler(on_date_changed);

               this.monthCalendar1.DateSelected += new System.Windows.Forms.DateRangeEventHandler(on_date_selected);

 

               // Sets the dimensions of the calendar to 2 rows by 2 columns.

               this.monthCalendar1.CalendarDimensions = new System.Drawing.Size(2, 2);

 

               // Sets the beginning day of the week.

               this.monthCalendar1.FirstDayOfWeek = System.Windows.Forms.Day.Monday;

 

               // Sets the maximum days that can be selected in one selection.

               this.monthCalendar1.MaxSelectionCount = 21;

 

               // Sets the scroll rate.

               this.monthCalendar1.ScrollChange = 1;

 

               // Shows today's date.

               this.monthCalendar1.ShowToday = true;

 

               // Circles today's date.

               this.monthCalendar1.ShowTodayCircle = true;

 

               // Shows the week numbers.

               this.monthCalendar1.ShowWeekNumbers = true;

 

               // label1

               this.label1.Location = new System.Drawing.Point(10, this.monthCalendar1.Bottom + 10 );

               this.label1.Size = new System.Drawing.Size(360, 100 );

 

               // label2

               this.label2.Location = new System.Drawing.Point(10, this.label1.Bottom + 10 );

               this.label2.Size = new System.Drawing.Size(360, 100 );

 

               // Form1

               this.Controls.Add(this.monthCalendar1);

               this.Controls.Add(this.label1);

               this.Controls.Add(this.label2);

               this.Text = "Form1";

               this.ResumeLayout(false);

          }

 

          private void on_date_changed( object sender, DateRangeEventArgs e )

          {

               this.label1.Text= "OnDateChanged= [" + e.Start.ToShortDateString()

                                                    + "-" + e.End.ToShortDateString() + "]";

          }

 

          private void on_date_selected( object sender, System.Windows.Forms.DateRangeEventArgs e)

          {

               this.label2.Text = "OnDateSelected= [" + e.Start.ToShortDateString()

                                                      + "-" + e.End.ToShortDateString() + "]";

          }

 

          static void Main()

          {

               Application.Run( new Form1() );

          }

     }

}

Class Information

NamespaceSystem.Windows.Forms
Flash LibrarySystem.Windows.Forms.scl
Flash Library Version2.0.0.2118
Silverlight LibrarySystem.Windows.Forms.dll



© 2003-2007 NETiKA Technologies. All rights reserved.