// 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.Windows.Forms; using System.Drawing; namespace E { public partial class MainForm { private ProgressBar progressBar1; private Button button1; private Label label1; private void InitializeComponent() { progressBar1 = new ProgressBar(); button1 = new Button(); label1 = new Label(); SuspendLayout(); progressBar1.Location = new Point(50, 50); progressBar1.Name = "progressBar1"; progressBar1.Size = new Size(200, 25); button1.Location = new Point(50, 100); button1.Size = new Size(75, 40); button1.Text = "Send email"; button1.Click += new System.EventHandler(Button1Click); label1.Location = new Point(150, 100); label1.Size = new Size(125, 40); label1.Font = new Font(FontFamily.GenericSerif, 24.0f); label1.Text = ""; ClientSize = new Size(300, 200); Controls.Add(progressBar1); Controls.Add(button1); Controls.Add(label1); Text = "Mail sender"; ResumeLayout(false); } } }