Basic thing which I am currently unable to do with code in Windows Forms:

I want to remove a background image from a panel/picture box.

How do I set the BackgroundImage to nothing or remove the background in some other way?


Early in the code the background is added:

this->panel55->BackgroundImage = Image::FromFile(String::Concat(
   "\\Chess Files\\Resources\\Pieces\\Pawn_WHITE_on_WHITE.bmp"));
	this->panel55->BackgroundImageLayout = ImageLayout::Center;

How do I remove this using code later on?

Thanks in advance to anyone who helps me.

Just leave it empty

this->panel55->BackGroundImage = Image::FromFile("");

The code is untested but it should work