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);
posted @ 2016-01-11 21:09  淡墨青云  阅读(350)  评论(0编辑  收藏  举报