How to reduce the load on the system when working with Cursor in MouseMove on a dataGridView?

The WinForms project, it is a form with a dataGridView on which hangs the MouseMove event. The form fills the entire screen. Also, there is a running timer.
Here I define coordinates of the cell over which the mouse cursor is:
private Point A1;
int cellX;
int cellY;
private void dataGridView1_MouseMove(object sender, MouseEventArgs e)
{
 cellX = e.X / dataGridView1.Columns[0].Width;
 cellY = e.Y / dataGridView1.RowTemplate.Height;
 this.Text = "cellX:" + cellX + "cellY:" + cellY;
 }

CPU load is minimal.
But in addition to find the cell I want the cursor could only move Postojna. Try to add in my method like this code:
A1.X = dataGridView1.Left + e.X;
A1.Y = 200 + dataGridView1.RowTemplate.Height/2;
Cursor.Position = A1; //as I understand it, the brakes because of this line.

I got what you wanted, and the cursor moves along one of the rows, but when you hover over a dataGridView load on one of the cores in task Manager rises to 100% and the timer is stopped until the cursor leaves the table limits.

Are there any less expensive way to solve the problem or is there anyway to optimize my method?
July 8th 19 at 12:01
2 answers
July 8th 19 at 12:03
Solution
The problem is partially solved by space problem in the row if:
if (kk == 3)
{
Cursor.Position = A1;
kk = 0;
}
kk++;
July 8th 19 at 12:05
Don't use A1 and write once in Position. C# I don't know, but an unnecessary temporary object speed precisely does not add.

Find more questions by tags ProgrammingC#.NETWindows Forms