I am developing an application which triggers when there is a windows explorer window in foreground. My application triggers a window (form) which will be placed on screen near the opened windows explorer (Planning to keep it just below the search option).
But I am not getting anything to get the window position of foreground "windows explorer" window.
Is there any way to read the position of current foreground “Windows Explorer” window using .net?
You can do this by using unmanaged code.
Create a class:
Then, identify the explorer process to pick up your handle, and take the coordinates and the size of the window, and from there you can do what you want:
Set 'Allow unsafe code' on Properties/Build...