我希望当我悬停在按钮上时,它仍然保持30%的透明度(这样您可以看到表单背景图像),但仍然能看到一些颜色。
我尝试了这个方法,但它只给了我一个黑色的空白:
private void roundedButton2_MouseEnter(object sender, EventArgs e)
{
roundedButton2.UseVisualStyleBackColor = false;
roundedButton2.FlatAppearance.MouseOverBackColor = Color.FromArgb(100, Color.Black);
}
private void roundedButton2_MouseLeave(object sender, EventArgs e)
{
roundedButton2.UseVisualStyleBackColor = true;
roundedButton2.BackColor = Color.Transparent;
}
roundedButton2.FlatAppearance.MouseOverBackColor = Color.FromArgb(100, Color.Black);
! - TaW