// 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.Drawing; using System.Windows.Forms; namespace E { partial class MainForm { private Button button4; private Button button3; private Button button2; private Button button1; public void InitializeComponents() { button1 = new Button(); button2 = new Button(); button3 = new Button(); button4 = new Button(); SuspendLayout(); button1.Location = new Point(25, 25); button1.Name = "button1"; button1.Size = new Size(200, 25); button1.Text = "Open log message windows"; button1.Click += new System.EventHandler(Button1Click); button2.Location = new Point(25, 75); button2.Name = "button2"; button2.Size = new Size(200, 25); button2.Text = "Log info"; button2.Click += new System.EventHandler(Button2Click); button3.Location = new Point(25, 125); button3.Name = "button3"; button3.Size = new Size(200, 25); button3.Text = "Log warning"; button3.Click += new System.EventHandler(Button3Click); button4.Location = new Point(25, 175); button4.Name = "button4"; button4.Size = new Size(200, 25); button4.Text = "Log error"; button4.Click += new System.EventHandler(Button4Click); ClientSize = new Size(250, 225); Controls.Add(button4); Controls.Add(button3); Controls.Add(button2); Controls.Add(button1); Name = "MainForm"; Text = "Log demo"; ResumeLayout(false); } } }