// 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 Form1 { private TextBox textBox1; public void InitializeComponents() { textBox1 = new TextBox(); SuspendLayout(); textBox1.Location = new Point(25, 25); textBox1.Multiline = true; textBox1.Name = "textBox1"; textBox1.ScrollBars = ScrollBars.Vertical; textBox1.Size = new Size(550, 550); ClientSize = new Size(600, 600); Controls.Add(textBox1); Name = "Form1"; Text = "Log messages"; ResumeLayout(false); PerformLayout(); } } }