

 |
|
c#中对mdi的操作,代码见内(child部分)
|
|
|
child.cs<br>
------------------------------------------------------------<br>
<br>
using System;<br>
using System.Drawing;<br>
using System.Collections;<br>
using System.ComponentModel;<br>
using System.Windows.Forms;<br>
<br>
namespace testagain<br>
{<br>
/// <summary><br>
/// Summary description for child.<br>
/// </summary><br>
public class child : System.Windows.Forms.Form<br>
{<br>
private System.Windows.Forms.Label lbl_about;<br>
private System.Windows.Forms.Label label1;<br>
/// <summary><br>
/// Required designer variable.<br>
/// </summary><br>
private System.ComponentModel.Container components = null;<br>
<br>
public child(Form f_MainForm)<br>
{<br>
//<br>
// Required for Windows Form Designer support<br>
//<br>
InitializeComponent();<br>
this.MdiParent = f_MainForm;<br>
<br>
//<br>
// TODO: Add any constructor code after InitializeComponent call<br>
//<br>
}<br>
<br>
/// <summary><br>
/// Clean up any resources being used.<br>
/// </summary><br>
protected override void Dispose( bool disposing )<br>
{<br>
if( disposing )<br>
{<br>
if(components != null)<br>
{<br>
components.Dispose();<br>
}<br>
}<br>
base.Dispose( disposing );<br>
}<br>
<br>
#region Windows Form Designer generated code<br>
/// <summary><br>
/// Required method for Designer support - do not modify<br>
/// the contents of this method with the code editor.<br>
/// </summary><br>
private void InitializeComponent()<br>
{<br>
this.lbl_about = new System.Windows.Forms.Label();<br>
this.label1 = new System.Windows.Forms.Label();<br>
this.SuspendLayout();<br>
// <br>
// lbl_about<br>
// <br>
this.lbl_about.Font = new System.Drawing.Font("黑体", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));<br>
this.lbl_about.Location = new System.Drawing.Point(56, 48);<br>
this.lbl_about.Name = "lbl_about";<br>
this.lbl_about.Size = new System.Drawing.Size(344, 40);<br>
this.lbl_about.TabIndex = 0;<br>
this.lbl_about.Text = "MDI窗体操作演示示例";<br>
// <br>
// label1<br>
// <br>
this.label1.Location = new System.Drawing.Point(312, 112);<br>
this.label1.Name = "label1";<br>
this.label1.Size = new System.Drawing.Size(136, 16);<br>
this.label1.TabIndex = 1;<br>
this.label1.Text = "东方蜘蛛 2001-7-1";<br>
// <br>
// child<br>
// <br>
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);<br>
this.ClientSize = new System.Drawing.Size(536, 329);<br>
this.Controls.AddRange(new System.Windows.Forms.Control[] {<br>
this.label1,<br>
this.lbl_about});<br>
this.Name = "child";<br>
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;<br>
this.Text = "MDI窗体操作演示_子窗体";<br>
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;<br>
this.ResumeLayout(false);<br>
<br>
}<br>
#endregion<br>
}<br>
}<br>
| |
|
上一篇:终于搞定c#中对mdi的操作,代码见内(parent部分)
下一篇:Rotation Sample
|
普克创业投资网刊载此文不代表同意其说法或描述,仅为提供更多信息。
|
|