ChildForm.cs
上传用户:lxycoco
上传日期:2022-07-21
资源大小:38457k
文件大小:2k
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- namespace SimpleMDIApp
- {
- /// <summary>
- /// Summary description for ChildForm.
- /// </summary>
- public class ChildForm : System.Windows.Forms.Form
- {
- private System.Windows.Forms.MainMenu mainMenu1;
- private System.Windows.Forms.MenuItem mnuChildClose;
- private System.Windows.Forms.MenuItem menuChild;
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.Container components = null;
- public ChildForm()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
- #region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.mainMenu1 = new System.Windows.Forms.MainMenu();
- this.menuChild = new System.Windows.Forms.MenuItem();
- this.mnuChildClose = new System.Windows.Forms.MenuItem();
- //
- // mainMenu1
- //
- this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menuChild});
- //
- // menuChild
- //
- this.menuChild.Index = 0;
- this.menuChild.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.mnuChildClose});
- this.menuChild.MergeType = System.Windows.Forms.MenuMerge.MergeItems;
- this.menuChild.Text = "Child";
- //
- // mnuChildClose
- //
- this.mnuChildClose.Index = 0;
- this.mnuChildClose.Text = "Close";
- this.mnuChildClose.Click += new System.EventHandler(this.mnuChildClose_Click);
- //
- // ChildForm
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(292, 271);
- this.Menu = this.mainMenu1;
- this.Name = "ChildForm";
- this.Text = "ChildForm";
- }
- #endregion
- private void mnuChildClose_Click(object sender, System.EventArgs e)
- {
- this.Close();
- }
- }
- }