在C#中出现“System.Windows.Forms.Button”并不包含对“FlatAppearance”的定义,怎么办 5
我画了一个button按钮,然后想把它设置为透明的,写了一段代码privatevoidbutton1_MouseEnter(objectsender,System.Eve...
我画了一个button按钮,然后想把它设置为透明的,写了一段代码
private void button1_MouseEnter(object sender, System.EventArgs e)
{
button1.FlatStyle = FlatStyle.Flat;
button1.FlatAppearance.BorderSize = 0;
button1.FlatAppearance.MouseOverBackColor = Form1.ActiveForm.BackColor;
button1.FlatAppearance.MouseDownBackColor = Form1.ActiveForm.BackColor;
}
运行时就出现这个错误啦,请高手帮帮忙,谢谢! 展开
private void button1_MouseEnter(object sender, System.EventArgs e)
{
button1.FlatStyle = FlatStyle.Flat;
button1.FlatAppearance.BorderSize = 0;
button1.FlatAppearance.MouseOverBackColor = Form1.ActiveForm.BackColor;
button1.FlatAppearance.MouseDownBackColor = Form1.ActiveForm.BackColor;
}
运行时就出现这个错误啦,请高手帮帮忙,谢谢! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询