Getting position of Game Window

Hi there, is there a way to get the location of the game window and probably the monitor resolution in game? I’m basically making a game where I want the player to sometimes drag the window around the screen or partly off screen sometimes. Also as a bonus if there’s a way to tell when the players are dragging it that’d be great too. I realize this may be beyond unity’s access to the system but it would be great.

Thanks for any help!

It’s possible for Windows applications with DLL import from user32.dll.
A Similiar question has been asked here before:

There is a GetWindow method too which you can use

For detecting dragging: