public void ApplyShadows(Form form) { int attrValue = 2; DropShaddow.DwmSetWindowAttribute(form.Handle, 2, ref attrValue, 4); DropShaddow.MARGINS pMarInset = new DropShaddow.MARGINS() { bottomHeight = 1, leftWidth = 0, rightWidth = 0, topHeight = 0 }; DropShaddow.DwmExtendFrameIntoClientArea(form.Handle, ref pMarInset); }
public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref DropShaddow.MARGINS pMarInset);