1.闪电事件,注意添加手动或者点击按钮->属性中的闪电->下面对应各种事件

在上面:

private void button1_MouseHover(object sender, EventArgs e)
{
button1.BackgroundImage = Properties.Resources.Image3;//鼠标指上去则使用Image3
}

点击:--直接双击按钮即可

private void button1_Click(object sender, EventArgs e)
{

}

离开:

private void button1_MouseLeave(object sender, EventArgs e)
{
if (Button1Statue) //鼠标移开,返回原来状态
{
button1.BackgroundImage = Properties.Resources.Image1;
}
else
{
button1.BackgroundImage = Properties.Resources.Image2;
}
}

相关文章:

  • 2022-12-23
  • 2022-02-01
  • 2021-06-11
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2021-12-04
  • 2021-07-28
相关资源
相似解决方案