示例#1
0
 protected override void OnPaintBackground(PaintEventArgs e)
 {
     base.OnPaintBackground(e);
     if (LayouKind.DwmIsCompositionEnabled())
     {
         e.Graphics.Clear(Color.White);
     }
 }
示例#2
0
 protected override void OnLoad(EventArgs e)
 {
     if (LayouKind.DwmIsCompositionEnabled())
     {
         MARGINS margin = new MARGINS();
         margin.Right = margin.Left = margin.Bottom = margin.Top = -1;
         LayouKind.DwmExtendFrameIntoClientArea(this.Handle, ref margin);
     }
     base.OnLoad(e);
 }