Author Topic: _SCREENIMAGE bug?  (Read 7835 times)

0 Members and 1 Guest are viewing this topic.

Offline LM

  • Newbie
  • Posts: 28
    • View Profile
Re: _SCREENIMAGE bug?
« Reply #15 on: March 22, 2021, 10:26:37 pm »
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?

@SpriggsySpriggs
64 bit in both cases (both the Win 10 and Win 8.0 machines).

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: _SCREENIMAGE bug?
« Reply #16 on: March 22, 2021, 10:29:33 pm »
@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.
Shuwatch!

Offline LM

  • Newbie
  • Posts: 28
    • View Profile
Re: _SCREENIMAGE bug?
« Reply #17 on: March 22, 2021, 10:37:00 pm »
@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.

@SpriggsySpriggs
I can only do Win 8 at the moment.  This is what I get with no text enlargement:
0
0     0     1920   1080
0     0     1920   1080

This is what I get with text enlargement:
0
0     0     1536   864
0     0     1536   864

And this is what I get with even more text enlargement:

This is what I get with text enlargement (largest):
0
0     0     1280   720
0     0     1280   720

In all cases, the actual screen that I see on the computer still appears to be 1920x1080 but windows and text are enlarged.  I mean, things like the clock, date and small icons in the task bar are still 1920x1080 type resolution regardless of the text enlargement setting.

LM


« Last Edit: March 22, 2021, 10:39:48 pm by LM »

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: _SCREENIMAGE bug?
« Reply #18 on: March 22, 2021, 10:38:14 pm »
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.1. If you are only doing a text enlargement then that's probably why you aren't seeing a change. Resolution scaling != text size increase.

@Petr Can you run my last code snippet on your machine after changing your resolution scaling to something other than 100%?  If you can run it once with SetProcessDPIAware and once with SetProcessDpiAwareness then that will be great. A success with SetProcessDPIAware is anything nonzero and a success with SetProcessDpiAwareness is zero.
« Last Edit: March 22, 2021, 10:51:32 pm by SpriggsySpriggs »
Shuwatch!

Offline LM

  • Newbie
  • Posts: 28
    • View Profile
Re: _SCREENIMAGE bug?
« Reply #19 on: March 22, 2021, 10:50:25 pm »
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.

@SpriggsySpriggs
I have attached images of my settings.  The only thing I changed in the different scenarios is sliding the slider to the different positions (smaller -> larger) (see text_enlargement_settings_Win8.jpg).  I will try to check on Win 10 tomorrow - probably can't get to that machine tonight.

Again, in all cases the true resolution of my computer screen remains 1920x1080, but the size of text and windows vary.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: _SCREENIMAGE bug?
« Reply #20 on: March 22, 2021, 10:55:56 pm »
@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.
Shuwatch!

Offline LM

  • Newbie
  • Posts: 28
    • View Profile
Re: _SCREENIMAGE bug?
« Reply #21 on: March 23, 2021, 12:03:07 am »
@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


Offline LM

  • Newbie
  • Posts: 28
    • View Profile
Re: _SCREENIMAGE bug?
« Reply #22 on: March 23, 2021, 07:43:06 am »
@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

@SpriggsySpriggs
It works now on the Win 10 machine too (with your code).  Thanks!

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: _SCREENIMAGE bug?
« Reply #23 on: March 23, 2021, 09:16:23 am »
@LM Glad to hear it worked! It sure had me baffled! Well, I guess the fact that it fixed your issue along with hanness' makes it a good evidence for a new merge on GitHub! Thank you for trying it out.
« Last Edit: March 23, 2021, 09:21:23 am by SpriggsySpriggs »
Shuwatch!

Offline George McGinn

  • Global Moderator
  • Forum Regular
  • Posts: 210
    • View Profile
    • Resume
Re: _SCREENIMAGE bug?
« Reply #24 on: March 23, 2021, 01:51:58 pm »
I'm on 64-bit
____________________________________________________________________
George McGinn
Theoretical/Applied Computer Scientist
Member: IEEE, IEEE Computer Society
Technical Council on Software Engineering
IEEE Standards Association
American Association for the Advancement of Science (AAAS)

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: _SCREENIMAGE bug?
« Reply #25 on: March 24, 2021, 12:45:30 pm »
@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!
Shuwatch!

Offline LM

  • Newbie
  • Posts: 28
    • View Profile
Re: _SCREENIMAGE bug?
« Reply #26 on: March 24, 2021, 11:35:39 pm »
@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!

@SpriggsySpriggs
Thanks!  Much appreciated.  I will check it out.