new StatusBar() : StatusBar « System.Windows.Forms « C# / C Sharp by API






new StatusBar()

 

using System;
using System.Drawing;
using System.Windows.Forms;
   
class SimpleStatusBar: Form
{
     public static void Main()
     {
          Application.Run(new SimpleStatusBar());
     }
     public SimpleStatusBar()
     {
          Text = "Simple Status Bar";
          ResizeRedraw = true;
   
          StatusBar sb = new StatusBar();
          sb.Parent = this;
          sb.Text = "My initial status bar text";
     }
     protected override void OnPaint(PaintEventArgs pea)
     {
          Graphics grfx = pea.Graphics;
          Pen      pen  = new Pen(ForeColor);
   
          grfx.DrawLine(pen, 0, 0, ClientSize.Width, ClientSize.Height);
          grfx.DrawLine(pen, ClientSize.Width, 0, 0, ClientSize.Height);
     }
}

   
  








Related examples in the same category

1.StatusBar.Items.AddRange
2.StatusBar.Panels
3.StatusBar.Panels.Add
4.StatusBar.ShowPanels