Advertisement
gelatofu

LabExer5_TypeOne.cs

Mar 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using System;
  2. using System.Windows.Forms;
  3. using System.Drawing;
  4.  
  5. namespace MyForm
  6. {
  7.     public class TypeOne : Form
  8.     {
  9.         private Button bBack;
  10.         private Label labelOne;
  11.  
  12.         public TypeOne(){
  13.             InitializeComponents();
  14.         }
  15.  
  16.         public void InitializeComponents()
  17.         {
  18.             this.Text = "Type One";
  19.             this.BackColor = Color.Lavender;
  20.             this.ForeColor = Color.Black;
  21.             this.Size = new Size(250, 300);
  22.             this.StartPosition = FormStartPosition.CenterScreen;
  23.  
  24.             bBack = new Button();
  25.             bBack.Location = new Point(80, 110);
  26.             bBack.Click += bBack_Click;
  27.             bBack.Text = "Back";
  28.  
  29.             labelOne = new Label();
  30.             labelOne.Text = "Account Type One";
  31.             labelOne.Location = new Point(70, 80);
  32.  
  33.             this.Controls.Add(labelOne);
  34.             this.Controls.Add(bBack);
  35.         }
  36.  
  37.         public void bBack_Click(object sender, EventArgs e)
  38.         {
  39.             Index ind = new Index();
  40.             ind.Show();
  41.             this.Hide();
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement