Exemplo n.º 1
0
 /// <summary>
 /// WNDs the proc.
 /// </summary>
 /// <param name="m">The Windows <see cref="T:System.Windows.Forms.Message" /> to process.</param>
 protected override void WndProc(ref Message m)
 {
     if (m.Msg == 133)
     {
         int num = 2;
         if (this._aeroEnabled)
         {
             ZeroitMetroForm.NativeMethods.DwmSetWindowAttribute(this.Handle, 2, ref num, 4);
             ZeroitMetroForm.NativeStructs.MARGINS mARGIN = new ZeroitMetroForm.NativeStructs.MARGINS()
             {
                 bottomHeight = 1,
                 leftWidth    = 1,
                 rightWidth   = 1,
                 topHeight    = 1
             };
             ZeroitMetroForm.NativeMethods.DwmExtendFrameIntoClientArea(this.Handle, ref mARGIN);
         }
     }
     base.WndProc(ref m);
 }
Exemplo n.º 2
0
 public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref ZeroitMetroForm.NativeStructs.MARGINS pMarInset);