using System; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } MenuStrip menuStrip1 = new MenuStrip(); StatusStrip statusStrip1 = new StatusStrip(); TextBox textBox1 = new TextBox(); private void Form1_Load(object sender, EventArgs e) { menuStrip1.Dock = DockStyle.Top; statusStrip1.Dock = DockStyle.Bottom; textBox1.Dock = DockStyle.Fill; textBox1.Multiline = true; textBox1.ScrollBars = ScrollBars.Both; //zオーダーは親コントロール(この場合はForm1)に追加した段階できまる。 this.Controls.Add(menuStrip1); this.Controls.Add(statusStrip1); this.Controls.Add(textBox1); //zオーダーを調整可能 textBox1.BringToFront(); statusStrip1.SendToBack(); } } }