// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Drawing; using System.Windows.Forms; public class MainForm : Form { private Label lbl; public MainForm() { InitializeComponent(); } [STAThread] public static void Main(string[] args) { Application.Run(new MainForm()); } private void InitializeComponent() { lbl = new Label(); lbl.Text = "Hello World"; lbl.Size = new Size(100, 25); lbl.Location = new Point(25, 50); SuspendLayout(); Controls.Add(lbl); ClientSize = new Size(150, 100); Text = "Test"; ResumeLayout(false); } }