C# WinForm 编译程序并运行,窗体阴影效果

const int CS_DROPSHADOW = 0x20000;html

        constint GCL_STYLE = (-26);ide

        //声明Win32 APIthis

        [DllImport("user32.dll", CharSet = CharSet.Auto)]spa

        publicstatic extern int SetClassLong(IntPtrhwnd, int nIndex, intdwNewLong);htm

        [DllImport("user32.dll", CharSet = CharSet.Auto)]blog

        public static extern int GetClassLong(IntPtrhwnd, int nIndex);get

//调用it

SetClassLong(this.Handle, GCL_STYLE, GetClassLong(this.Handle, GCL_STYLE) | CS_DROPSHADOW);class

相关页面:http://hi.baidu.com/xiangboren/blog/item/5eafe2240a5aa4308644f96e.htmlstatic

相关文章
相关标签/搜索