Hello guys. I made a picture box and i want like when a button is pressed , the BackgroundImage of Picture Box to be changed in a screenshot from my resources.
Look what i did:
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (listBox1.SelectedItem.Equals("Rocket Launcher I"))
pictureBox1.BackgroundImage = "sa-mp-042.png";
}
But i get error: Error2: Cannot implicitly convert type 'string' to 'System.Drawing.Image'