How can I use aero glass to cover my entire forms? Here is an example of what I mean:
Asked
Active
Viewed 3,384 times
1 Answers
13
[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);

Anders Forsgren
- 10,827
- 4
- 40
- 77

user828922
- 146
- 1
- 5
-
1Thanks, this did the trick. You should fix the struct so it's in code tags. – Nahydrin Jul 05 '11 at 03:15
-
1Cool. BTW `marg` should be passed to `DwmExtendFrameIntoClientArea` as a `ref` (ie `DwmExtendFrameIntoClientArea(form.Handle, ref marg);`) – Rebecca Scott Jul 05 '11 at 10:10