[DllImport("user32.dll")] public static extern IntPtr SendMessage(IntPtr hWnd,int msg,int wparam,int lparam); protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (e.Button == MouseButtons.Left)//按下的是鼠标左键 { Capture = false;//释放鼠标使能够手动操作 SendMessage(Handle, 0x00A1, 2, 0);//拖动窗体 } }