So I need to store the information from:
this.PointToClient(Cursor.Position).ToString());
but when I try to do:
var variable = this.PointToClient(Cursor.Position).ToString());
it gives me
System.InvalidOperationException: 'Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on.'
I know how to get this numbers using
cursor_pos.Invoke(() => cursor_pos.Text = this.PointToClient(Cursor.Position).ToString())
But in that way I can't store them or change them. What do i need to do in that case?
Thank you!