winform 如何实现无边框阴影?求在线高手~
winform如何实现无边框阴影,求高手解答~
我边框已经设置了 FixedSingle:None 无边框,然后自己也通过API设置了,可以移动了,
但我现在想加框的阴影,网上找了很多方法,都是带边框的,都不适用.求解决,求高手
无边框的 winform 如何加阴影呢?
------解决方案--------------------
public partial class Form1 : Form
{
...
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ClassStyle
------解决方案--------------------
= ClassStyles.CS_DROPSHADOW;
return cp;
}
}
}
public static class ClassStyles
{
public static readonly Int32
CS_BYTEALIGNCLIENT = 0x1000,
CS_BYTEALIGNWINDOW = 0x2000,
CS_CLASSDC = 0x0040,
CS_DBLCLKS = 0x0008,
CS_DROPSHADOW = 0x00020000,
CS_GLOBALCLASS = 0x4000,
CS_HREDRAW = 0x0002,
CS_NOCLOSE = 0x0200,
CS_OWNDC = 0x0020,
CS_PARENTDC = 0x0080,
CS_SAVEBITS = 0x0800,
CS_VREDRAW = 0x0001;
}
------解决方案--------------------