WinForm 控件不闪烁

  1:    [DllImport("user32")]
  2:    public static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, IntPtr lParam);
  3:    public const int WM_SETREDRAW = 0xB;
  4:    [DllImport("user32.dll")]
  5:    public static extern bool ReleaseCapture();
  6:    
  7:    //使用方法
  8:    ReleaseCapture();
  9:    SendMessage(this.Handle, 161, 2, IntPtr.Zero);

你可能感兴趣的:(WinForm 控件不闪烁)