Ejemplo n.º 1
0
 private void BorderStyle_StyleChanged(object sender, EventArgs e)
 {
     if (!BarFunctions.IsHandleValid(this)) return;
     const int RDW_INVALIDATE = 0x0001;
     const int RDW_FRAME = 0x0400;
     NativeFunctions.RECT r = new NativeFunctions.RECT(0, 0, this.Width, this.Height);
     NativeFunctions.RedrawWindow(this.Handle, ref r, IntPtr.Zero, RDW_INVALIDATE | RDW_FRAME);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Invalidates non-client area of the control.
 /// </summary>
 public void InvalidateNonClient()
 {
     if (!BarFunctions.IsHandleValid(this)) return;
     const int RDW_INVALIDATE = 0x0001;
     const int RDW_FRAME = 0x0400;
     NativeFunctions.RECT r = new NativeFunctions.RECT(0, 0, this.Width, this.Height);
     NativeFunctions.RedrawWindow(this.Handle, ref r, IntPtr.Zero, RDW_INVALIDATE | RDW_FRAME);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Invalidates non-client area of the text box as response to the border changes.
 /// </summary>
 public void InvalidateNonClient()
 {
     if (!BarFunctions.IsHandleValid(this)) return;
     NativeFunctions.SetWindowPos(this.Handle, IntPtr.Zero, 0, 0, 0, 0, NativeFunctions.SWP_FRAMECHANGED |
                         NativeFunctions.SWP_NOACTIVATE | NativeFunctions.SWP_NOMOVE | NativeFunctions.SWP_NOSIZE | NativeFunctions.SWP_NOZORDER);
     SetAutoHeight();
     const int RDW_INVALIDATE = 0x0001;
     const int RDW_FRAME = 0x0400;
     NativeFunctions.RECT r = new NativeFunctions.RECT(0, 0, this.Width, this.Height);
     NativeFunctions.RedrawWindow(this.Handle, ref r, IntPtr.Zero, RDW_INVALIDATE | RDW_FRAME);
 }