This isn’t as malicious as it sounds, I want to get the current size of their windows, not look at what is in them. The purpose is to figure out that if every other window is fullscreen then I should start up like that too. Or if all the other processes are only 800×600 despite there being a huge resolution then that is probably what the user wants. Why make them waste time and energy resizing my window to match all the others they have? I am primarily a Windows devoloper but it wouldn’t upset me in the least if there was a cross platform way to do this.
Share
Using hints from WindowMover article and Nattee Niparnan’s blog post I managed to create this:
You need the Win32 Extensions for Python module for this to work.
EDIT: I discovered that
GetWindowRectgives more correct results thanGetClientRect. Source has been updated.