[.net] C# Form background image

Started by
2 comments, last by TheTroll 15 years, 9 months ago
I have created a new form with a tiled background image. (It was created by VS2005 when I set the image in the properties tab) What I would like to know is if there is a way to turn the image off and on whenever i need to. I've checked all the variables and functions in the form class but can't seem to find one that can do this.
Advertisement
image1 = new Bitmap(@"C:\Documents and Settings\All Users\" + @"Documents\My Music\music.bmp", true);
form.BackgroundImage = image1;

to hide the image.
form.BackgroundImage = null;

to show
form.BackgroundImage = image1;

theTroll
Thanks so much for the quick response. That worked perfectly and achieved the desired results. Thanks again. I'm just getting into C# so I really appreciate the help.
No problem. C# takes a bit of new way of thinking some times.

theTroll

This topic is closed to new replies.

Advertisement