效果:
1.
2.
代码:
private Boolean fals = true; /// <summary>
/// 单击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void pictureBox3_Click(object sender, EventArgs e)
{
if (fals == true)
{
this.pictureBox3.BackgroundImage = Image.FromFile(Application.StartupPath + "\\image\\" + "stop.ico");
fals = false;
}
else
{
this.pictureBox3.BackgroundImage = Image.FromFile(Application.StartupPath + "\\image\\" + "start.ico");
fals = true;
}
}