Changing Properties Of controls dynamically

Suppose we have three buttons and we want change their property dynamically we can do this as follows
Suppose we have 3 buttons button1, button2, button3

private void button1_Click(object sender, EventArgs e)
        {
            colorDialog1.ShowDialog();
            button1.BackColor = colorDialog1.Color;
        }
        private void button2_Click(object sender, EventArgs e)
        {
            fontDialog1.ShowDialog();
            button2.Font = fontDialog1.Font;
        }
        private void button3_Click(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog();
            //pictureBox1.ImageLocation = openFileDialog1.FileName;
            pictureBox1.Image = Image.FromFile(openFileDialog1.FileName);  
        }
Ebook Download
View all
Learn
View all