C # How to get the coordinates of a specific point on the screen. (not mouselocation)

I have the following problem: I am writing a WinForms application with C #, and I want to get a screen - the coordinates of a part of the image, in this case the upper part of this hand (marked with a red dot).

Does anyone know how I can do this programmatically?

("Koordinaten dieses Punktes" = the coordinates of this point)

EDIT: , , . , - , , MouseLocation , x: y MouseLocation. (-arrow).

, , .

0
2

:

this.PointToScreen(new System.Drawing.Point(250, 300));

( ).

0

Control.PointToScreen , , . Interop API Win32:

API:

[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern bool GetCursorPos(out Point lpPoint);

:

Point pts;
GetCursorPos(out pts);
MessageBox.Show(this, pts.ToString());
0

Source: https://habr.com/ru/post/1717924/


All Articles