Simple Status Bar with Panel : StatusBar « GUI Windows Forms « C# / CSharp Tutorial






using System;
using System.Drawing;
using System.Windows.Forms;
   
class SimpleStatusBarWithPanel: Form
{
     public static void Main()
     {
          Application.Run(new SimpleStatusBarWithPanel());
     }
     public SimpleStatusBarWithPanel()
     {
          Panel panel = new Panel();
          panel.Parent = this;
          panel.BackColor = SystemColors.Window;
          panel.ForeColor = SystemColors.WindowText;
          panel.AutoScroll = true;
          panel.Dock = DockStyle.Fill;
          panel.BorderStyle = BorderStyle.Fixed3D;
   
          StatusBar sb = new StatusBar();
          sb.Parent = this;
          sb.Text = "My initial status bar text";
   
          Label label = new Label();
          label.Parent = panel;
          label.Text = "Upper left";
          label.Location = new Point(0, 0);
   
          label = new Label();
          label.Parent = panel;
          label.Text = "Lower right";
          label.Location = new Point(250, 250);
          label.AutoSize = true;
     }
}








23.25.StatusBar
23.25.1.Simple Status Bar with Panel
23.25.2.Form with StatusBarForm with StatusBar
23.25.3.Add Icon to StatusBarAdd Icon to StatusBar
23.25.4.Date and Time in StatusBar
23.25.5.Status Bar and Auto-Scroll