Mega Code Archive

 
Categories / C# Tutorial / GUI Windows Forms
 

Status Bar and Auto-Scroll

using System; using System.Drawing; using System.Windows.Forms;     class StatusBarAndAutoScroll: Form {      public static void Main()      {           Application.Run(new StatusBarAndAutoScroll());      }      public StatusBarAndAutoScroll()      {           AutoScroll = true;               StatusBar sb = new StatusBar();           sb.Parent = this;           sb.Text = "My initial status bar text";               Label label = new Label();           label.Parent = this;           label.Text = "Upper left";           label.Location = new Point(0, 0);               label = new Label();           label.Parent = this;           label.Text = "Lower right";           label.Location = new Point(250, 250);           label.AutoSize = true;      } }