using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CH3_1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            textBox1.Text = "When loading form ";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            SizeF scale = new SizeF(2.1f, 4.2f);
            Form1.ActiveForm.Scale(scale);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Text = "This is a simple program";
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Form1.ActiveForm.Text = "This is new title";
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Form1.ActiveForm.Close();
        }
    }
}
