ComponentFactory.Krypton.Toolkit.DWM.ExtendFrameIntoClientArea C# (CSharp) Method

ExtendFrameIntoClientArea() public static method

Change the distance the frame extends into the client area.
public static ExtendFrameIntoClientArea ( IntPtr hWnd, Padding padding ) : void
hWnd System.IntPtr 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);
        }