工具栏toolstrip可含子项对象toolstriplabel或toolstripseparator或toolstriptextbox

// toolStripLabel1
            //
            this.toolStripLabel1.Name = "toolStripLabel1";
            this.toolStripLabel1.Size = new System.Drawing.Size(72, 22);
            this.toolStripLabel1.Text = "工具栏项1";
            //
            // toolStripLabel2
            //
            this.toolStripLabel2.Name = "toolStripLabel2";
            this.toolStripLabel2.Size = new System.Drawing.Size(72, 22);
            this.toolStripLabel2.Text = "工具栏项2";
            //
            // toolStripSeparator2
            //
            this.toolStripSeparator2.Name = "toolStripSeparator2";
            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);

 

 

状态栏statusstrip,包含子项控件toolstripprogressbar及toolstripstatuslabel

private void newmanualform_Load(object sender, EventArgs e)
        {
            //toolstripstatuslabel是状态栏的子控件,也可以包含toolstripdropdownbutton及toolstripsplitbuttion
            //now.toshortdatestring转化为短日期字符串显示
            toolStripStatusLabel1.Text = DateTime.Now.ToShortDateString();
            //toolStripProgressBar是状态栏的子控件
            toolStripProgressBar1.Minimum = 0;
            toolStripProgressBar1.Maximum = 5000;
            toolStripProgressBar1.Step = 2;
            for (int i = 0; i < 5000; i++)
            {
                toolStripProgressBar1.PerformStep();
            }

        }

 

 菜单栏menustrip

下述为菜单栏菜单项 toolstripmenuitem

private System.Windows.Forms.ToolStripMenuItem 文件FToolStripMenuItem;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-717410/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9240380/viewspace-717410/

Logo

欢迎加入DeepSeek 技术社区。在这里,你可以找到志同道合的朋友,共同探索AI技术的奥秘。

更多推荐