c#選單欄menustrip工具欄toolstrip狀態列

wisdomone1發表於2012-02-29

 

  工具欄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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章