Beispiel #1
0
 /// <summary>
 ///   Extends the window frame into the client area.
 /// </summary>
 ///
 /// <param name="window">
 ///   The handle to the window in which the frame will
 ///   be extended into the client area.</param>
 /// <param name="margins">
 ///   A pointer to a <see cref="ThemeMargins"/> structure that describes
 ///   the margins to use when extending the frame into the client area.</param>
 ///
 public static void ExtendAeroGlassIntoClientArea(IWin32Window window, ThemeMargins margins)
 {
     if (window == null)
     {
         throw new ArgumentNullException("window");
     }
     NativeMethods.DwmExtendFrameIntoClientArea(window.Handle, ref margins);
 }
Beispiel #2
0
 internal static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref ThemeMargins margins);
 internal static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref ThemeMargins margins);
Beispiel #4
0
        // Aero Glass settings
        //
        private void MainForm_Load(object sender, EventArgs e)
        {
            // Perform special processing to enable aero
            if (SafeNativeMethods.IsAeroEnabled)
            {
                ThemeMargins margins = new ThemeMargins();
                margins.TopHeight = canvas.Top;
                margins.LeftWidth = canvas.Left;
                margins.RightWidth = ClientRectangle.Right - gridSamples.Right;
                margins.BottomHeight = ClientRectangle.Bottom - canvas.Bottom;

                // Extend the Frame into client area
                SafeNativeMethods.ExtendAeroGlassIntoClientArea(this, margins);
            }
        }
 /// <summary>
 ///   Extends the window frame into the client area.
 /// </summary>
 /// 
 /// <param name="window">
 ///   The handle to the window in which the frame will
 ///   be extended into the client area.</param>
 /// <param name="margins">
 ///   A pointer to a <see cref="ThemeMargins"/> structure that describes
 ///   the margins to use when extending the frame into the client area.</param>
 ///   
 public static void ExtendAeroGlassIntoClientArea(IWin32Window window, ThemeMargins margins)
 {
     if (window == null) throw new ArgumentNullException("window");
     NativeMethods.DwmExtendFrameIntoClientArea(window.Handle, ref margins);
 }