开发者

C#: Glass Forms?

开发者 https://www.devze.com 2023-03-17 12:19 出处:网络
How can I use aero glass to cover my entire forms? Here is an example of开发者_开发技巧 what I mean:

How can I use aero glass to cover my entire forms? Here is an example of开发者_开发技巧 what I mean:

C#: Glass Forms?


[StructLayout(LayoutKind.Sequential)]
public struct MARGINS
{
    public int Left;
    public int Right;
    public int Top;
    public int Bottom;
}

[DllImport("dwmapi.dll")]
public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMargins);

Then you can enable it on your form like so:

MARGINS marg = new MARGINS() { Left = -1, Right = -1, Top = -1, Bottom = -1 };
DwmExtendFrameIntoClientArea(form.Handle, ref marg);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号