The correct way to do this is not in time, but to call it when the user has sufficiently moved the mouse. The universal measure "moved enough" on Windows is the size of the double-click. Deploy CellMouseDown / Move event handlers, similar to this:
private Point mouseDownPos; private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { mouseDownPos = e.Location; } private void dataGridView1_CellMouseMove(object sender, DataGridViewCellMouseEventArgs e) { if ((e.Button & MouseButtons.Left) == MouseButtons.Left) { if (Math.Abs(eX - mouseDownPos.X) >= SystemInformation.DoubleClickSize.Width || Math.Abs(eY - mouseDownPos.Y) >= SystemInformation.DoubleClickSize.Height) {
source share