Saturday, December 27, 2014

Changing the backgroundimage of a MainFrame / Control

You can change the BackgroundImage of a form by following code



private void button1_Click(object sender, EventArgs e)
{
if (this.BackgroundImage == null)
this.BackgroundImage = new Bitmap(Properties.Resources.image1);
else
this.BackgroundImage = null;
}

-----------------------------------------------


Hope above help !


Doanh


No comments:

Post a Comment