@LM I have found the bug and squashed it, looks like. I am just waiting for the pull request on GitHub to be approved. Once it is, I'll let you know and you can download the Dev build and be A-OK.
It sounds like you have found the issue/solution so I assume you don't need me to run it anymore, but please let me know if my assumption is incorrect.
@LM I'd be interested to know that it does rectify the issue on your end. If you get a chance to run it, please do. I know it worked for me because I was setting the environment to be aware of the DPI scaling which resulted in correct screenshots. I know it should work on your machine but it would be good to see if it works on yours. Don't feel like you absolutely must, though. Chances are, the bug fix will work and you won't have to worry at all.
@George McGinn This shouldn't apply to Linux or Mac at all. LM mentioned he is running the code in Windows 10.@George McGinn As LM mentioned in his post, he's using Windows. The code I mentioned you could try running was his code in the original post, not mine. Mine is Windows only since this is a Windows issue. User32 is a Windows DLL.
@LM I'd be interested to know that it does rectify the issue on your end. If you get a chance to run it, please do. I know it worked for me because I was setting the environment to be aware of the DPI scaling which resulted in correct screenshots. I know it should work on your machine but it would be good to see if it works on yours. Don't feel like you absolutely must, though. Chances are, the bug fix will work and you won't have to worry at all.
Hmmmmm.... That does make me curious..... It should have made the program report back 1920 x 1080. Very curious. Something I haven't asked you yet is if you are on 32 or 64 bit.... Which are you on?
@LM Apologies, I edited my reply just as you were replying to it. Please review the code I posted and try running it in both of your environments.
You keep saying "Text enlargement". Are you doing something other than just scaling your resolution? I'd almost ask you to download my fork from GitHub and compile it to see if you can get the right results before we do a merge. I've not had one instance of it not working with my code so it is strange that yours is behaving like this, especially since the first function I gave you works in Vista and up and the second one starts with Windows 8. If you are only doing a text enlargement then that's probably why you aren't seeing a change. Resolution scaling != text size increase.
@LM I am seeing something in the settings that grabs my attention. In your second screenshot, the note at the bottom that mentions that the settings may not be applied until next time you sign out and sign in. I've seen posts online saying that people in 8 and above have had issues with SetProcessDPIAware and SetProcessDpiAwareness because they had not signed out and signed back in, finalizing the settings. In Windows 10, a log out and log in is not required as the settings can be finalized immediately.
@SpriggsySpriggs
Great catch! It seems to work after I restarted the Win 8 machine. I get this with the "medium" setting now:
0
0 0 1920 1080
0 0 1920 1080
With your code preceding the image& = _SCREENIMAGE statement, it appears that it is now grabbing the full screen like I want. I will try it on the Win 10 machine tomorrow.
I appreciate your effort on this. Sorry for the back and forth tonight. Great catch on the restart required in Win 8.
LM
@LM The latest dev build contains the bug fix and makes the program DPI aware. Download it at your convenience and let us know how it goes for you!