Search code examples
c#background-imagepicturebox

Clear a Picturebox.backgroundimage in c#


I have a picturebox where i can load a image into its .backgroundimage function and now i have a button that is suppose to clear it but doesn't. I have tried using this code: secondcapturebox.Dispose(); But yet still the image is in the picturebox. Please Help,

Thanks


Solution

  • Have you tried...

    secondcapturebox.BackgroundImage = null;