C# 使用PictureBox控件--点击切换图片

效果:

1.

C# 使用PictureBox控件--点击切换图片

2.

C# 使用PictureBox控件--点击切换图片

代码:

         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;
}
}
上一篇:BUUCTF RSA


下一篇:token登录