Page 1 of 1

[ScreenHeight] and [ScreenWidth] gives wrong values

PostPosted: Sun Nov 08, 2015 3:19 pm
by Light
My laptop screen is : 1920x1080

[ScreenHeight] gives me 864 (The height the entire Windows screen in pixels.)
[ScreenWidth] gives me 1536 (The width of the entire Windows screen in pixels.)

Looks like a bug to me ...
Can enybody confirm this ?

NeoBook 5.8.6
No plugins

To test: Put a simpel text control in a pub and and add the above variables. Then run the pub...

Edit:
Windows 10

Re: [ScreenHeight] and [ScreenWidth] gives wrong values

PostPosted: Sun Nov 08, 2015 5:00 pm
by Gaev
Light:

Just did a test on my week old laptop ... 17" screen ... 1600 by 900 pixels ... Windows 10 Home ... NeoBook v5.8.6 (6 Aug 2015) ... test pub shows 1600 and 900 ... so all OK.

Your [ScreenWidth] and [ScreenHeight] are both 0.8 of what you were expecting ... might offer a clue to the discrepancy.

Re: [ScreenHeight] and [ScreenWidth] gives wrong values

PostPosted: Mon Nov 09, 2015 12:48 am
by CN_Iceman
I tried in two desktop PCs and another two laptops with different resolutions and everything works properly. I use these variables in almost all my programs and never had problems.
While your screen resolution is 1920x1080... it is possible that for some reason you are running at a lower resolution?
Have you checked the Windows resolution?

Re: [ScreenHeight] and [ScreenWidth] gives wrong values

PostPosted: Mon Nov 09, 2015 6:41 am
by Light
I found the answere :
1) Right-click on desktop and select Display settings.
2) Look at the : "slider to change the size of text, app, and other items"

The slider on my laptop was set to 125%. I set it to 100% and tested ok. Then I had to change the resolution from 1920x1080 to the same as Gaev (1600x900) because the text was too small. So that works as a workaround.

But... I got my laptop a couple of mounths ago and it was preset to 125%.

Also, have a look at this :

http://www.windowscentral.com/how-make-text-apps-bigger-windows-10

You find this txt in the above page
"It might be set to 150% by default. " - Again, I think this is a problem if pc's have larger settings than 100% as default

Edit:
Thanks to both Gaev and CN_Iceman for replying... :)