public static ExtendFrameIntoClientArea ( |
||
hWnd | Window handle of form. | |
padding | Padding | Distance for each form edge. |
return | void |
public static void ExtendFrameIntoClientArea(IntPtr hWnd, Padding padding)
{
Debug.Assert(hWnd != null);
// Cerate structure that contains distances for each edge
PI.MARGINS margins = new PI.MARGINS();
margins.leftWidth = padding.Left;
margins.topHeight = padding.Top;
margins.rightWidth = padding.Right;
margins.bottomHeight = padding.Bottom;
// Request change from the desktop window manager
PI.DwmExtendFrameIntoClientArea(hWnd, ref margins);
}