Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get a window by coordinates

Tags:

c#

winapi

I have a point in screen coordinates and I need to find which window it "falls" onto. I.e. find the window (hWND) that is foremost of all windows containing the point. Pinvoke and WinApi is fine...

PS. I actually need to detect, which window is my mouse cursor currently "over", to put it another way.

like image 381
Alex from Jitbit Avatar asked Sep 06 '26 03:09

Alex from Jitbit


1 Answers

Use WindowFromPoint.

like image 173
Jon Avatar answered Sep 07 '26 18:09

Jon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!