标签:end str his red event class oca nbsp 主菜单
主菜单控件 MainMenu
工具栏控件 toolStrip
状态栏控件 statusStrip
Size、Location属性需要new,而其他不需要
单击菜单项的menuItem事件后,状态面板中显示相应的窗体尺寸信息
this.toolStripStatusLabel1.Text= "大窗体";
private void Form1_Load(object sender, EventArgs e) { this.Size = new Size(300, 200); } private void toolStripMenuItem1_Click(object sender, EventArgs e) { this.Size = new Size(600, 400); this.toolStripStatusLabel1.Text= "大窗体"; } private void toolStripMenuItem2_Click(object sender, EventArgs e) { this.Size = new Size(300, 200); this.toolStripStatusLabel1.Text = "中窗体"; } private void toolStripMenuItem3_Click(object sender, EventArgs e) { this.Size = new Size(150, 120); this.toolStripStatusLabel1.Text = "小窗体"; }
背景色
this.BackColor = Color.Red;
前景色
this.ForeColor = Color.Black;
标签:end str his red event class oca nbsp 主菜单
原文地址:http://www.cnblogs.com/Guara/p/7594471.html