public void createStatusBar(Form frmWork, StatusStrip statusBar) { ToolStripLabel panel1 = new ToolStripLabel(); ToolStripProgressBar panel2 = new ToolStripProgressBar(); ToolStripLabel panel3 = new ToolStripLabel(); System.Drawing.Size size = new System.Drawing.Size(); size.Width = Convert.ToInt32(frmWork.Width * 0.2); panel1.Text = ""; panel1.Size = size; panel1.ForeColor = System.Drawing.Color.Blue; panel2.Minimum = 0; panel2.Maximum = 10; panel2.Step = 1; panel2.Size = size; panel3.Text = setDateLocale(); panel3.BackColor = System.Drawing.Color.Black; panel3.ForeColor = System.Drawing.Color.White; panel3.Alignment = ToolStripItemAlignment.Right; statusBar.Show(); statusBar.Items.Add(panel1); statusBar.Items.Add(panel2); statusBar.Items.Add(panel3); }
private void StatusBarToolStripMenuItem_Click(object sender, EventArgs e) { if (StatusStrip.Visible) { StatusStrip.Hide(); } else { StatusStrip.Show(); } }