Mega Code Archive

 
Categories / C# Tutorial / GUI Windows Forms
 

Put MonthCalendar On a Form

using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; public class MonthCalendarOnForm : System.Windows.Forms.Form {   private System.Windows.Forms.MonthCalendar monthCalendar1;   private System.ComponentModel.Container components = null;   public MonthCalendarOnForm()   {     InitializeComponent();   }   protected override void Dispose( bool disposing )   {     if( disposing )     {       if (components != null)        {         components.Dispose();       }     }     base.Dispose( disposing );   }   #region Windows Form Designer generated code   private void InitializeComponent()   {     this.monthCalendar1 = new System.Windows.Forms.MonthCalendar();     this.SuspendLayout();     this.monthCalendar1.Location = new System.Drawing.Point(47, 56);     this.monthCalendar1.Name = "monthCalendar1";     this.monthCalendar1.TabIndex = 0;     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);     this.ClientSize = new System.Drawing.Size(292, 266);     this.Controls.AddRange(new System.Windows.Forms.Control[] {                                     this.monthCalendar1});     this.Name = "MonthCalendarOnForm";     this.Text = "MonthCalendar Control Example";     this.ResumeLayout(false);   }   #endregion   [STAThread]   static void Main()    {     Application.Run(new MonthCalendarOnForm());   } }