Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
ok i am trying to click a button and when i click it , it will change the BackGroundImage. here the code for it .
private void button1_Click_1(object sender, System.EventArgs e)
Image image = Image.FromFile("C:\j.jpeg");
Image picture = Image.FromFile("C:\h.jpeg");
i = 2;
if( i > 3)
BackgroundImage = picture;
BackgroundImage = image;
and then i get this message after it excutes with no errors
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in system.drawing.dll
additional information: C:j.jpeg