// This version of InitDialog() handles merged UIs
        internal static int InitDialog(
            Form dialog,
            IDeviceSpecificDesigner designer,
            int mergingContext
            )
        {
            InitDialog(dialog, designer.UnderlyingControl.Site);
            int tabOffset = 0;

            designer.InitHeader(mergingContext);
            Control header = designer.Header;

            if (header != null)
            {
                // (6, 5) = Windows standard positioning
                header.Location = new Point(6, 5);
                dialog.Controls.Add(header);
                // +6 = 6px space between header and first control
                dialog.Height += header.Height + 6;
                tabOffset      = GenericUI.GetMaxContainedTabIndex(header);
                // Changing the header width is going to magically
                // cause everything to be repositioned vertically
                // -10 = 5px padding on each side of the client area
                header.Width = dialog.ClientSize.Width - 10;
            }
            return(tabOffset);
        }
 // This version of InitDialog() handles merged UIs
 internal static int InitDialog(
     Form dialog,
     IDeviceSpecificDesigner designer,
     int mergingContext
 ) {
     InitDialog(dialog, designer.UnderlyingControl.Site);
     int tabOffset = 0;
     designer.InitHeader(mergingContext);
     Control header = designer.Header;
     if (header != null)
     {
         // (6, 5) = Windows standard positioning
         header.Location = new Point(6, 5);
         dialog.Controls.Add(header);
         // +6 = 6px space between header and first control
         dialog.Height += header.Height + 6;
         tabOffset = GenericUI.GetMaxContainedTabIndex(header);
         // Changing the header width is going to magically
         // cause everything to be repositioned vertically
         // -10 = 5px padding on each side of the client area
         header.Width = dialog.ClientSize.Width - 10;
     }
     return tabOffset;
 }