I'm trying to make a "checkbox" that has a custom check image. I need it to toggle between checked and unchecked when the user clicks the picturebox. I've tried the following code, and the first click shows the checked image fine, however a second click does nothing. Any ideas?
private void pictureBox7_Click(object sender, EventArgs e)
{
if (pictureBox7.Image == Image.FromFile(checkedImg))
{
pictureBox7.Image = Image.FromFile(uncheckedImg);
}
else
{
pictureBox7.Image = Image.FromFile(checkedImg);
}
}