I am having two forms (A
and B
). In form B
there are many buttons having different background image. On clicking any of the button I want to change the background image of form A
to the background image of the button which was clicked instantly as it is always open behind the form.
formA mai = new formA();
private void button1_Click(object sender, EventArgs e)
{
mai.BackgroundImage = button1.BackgroundImage;
}
This is the code I am using although it changes the background image it doesn't change instantly but if I will open and close the form the background image will be changed. I don't need like that I need it to change instantly.