ITPub博客

首页 > Linux操作系统 > Linux操作系统 > c#菜单栏menustrip工具栏toolstrip状态栏

c#菜单栏menustrip工具栏toolstrip状态栏

原创 Linux操作系统 作者:wisdomone1 时间:2012-02-29 22:43:38 0 删除 编辑

 

  工具栏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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb qq: 305076427 微博: wisdomone9

注册时间:2008-04-04

  • 博文量
    2149
  • 访问量
    11889443