C#: Glass Forms?
How can I use aero glass to cover my entire forms? Here is an example of开发者_开发技巧 what I mean:
[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);
精彩评论