设置了Button的背景图为png图片,FlatStyle为Flat,边框粗细为0,当鼠标进去按钮时更换另一张png背景图,但是出现了默认的阴影效果,影响美观,有没有办法去掉。

解决方案 »

  1.   

    不了解 flatstyle,但是你可以把图片的背景设置成和界面背景相同应该就没为题了,这是WPF里的还是Winfom里的
      

  2.   

    http://blog.csdn.net/az44yao/article/details/7427197
    透明按钮
      

  3.   

    btn.FlatStyle = FlatStyle.Flat;//样式
        btn.ForeColor = Color.Transparent;//前景
        btn.BackColor = Color.Transparent;//去背景
        btn.FlatAppearance.BorderSize = 0;//去边线
        btn.FlatAppearance.MouseOverBackColor = Color.Transparent;//鼠标经过
        btn.FlatAppearance.MouseDownBackColor = Color.Transparent;//鼠标按下