Resolution Question

Hey gang,

One of my apps has a default window size of 1261 x 813. Plenty of room to fit on a 1920 x 1080 monitor.

One of my colleagues in another state is telling me that the app extends beyond his taskbar. He has a 1920 x 1080 screen on his laptop. Windows 8.1. I’ve put text on my window indicating window size and position, did a build and sent it to him.

The frame work is reporting the correct size - 1261 x 813 but it is definitely extending into and beyond his task bar.

What might be going on? Is Windows doing some scaling? I’m not sure if he has a HiDPI display or not. How do I compensate for that?

Jon

[quote=177903:@Jon Ogden]Hey gang,

One of my apps has a default window size of 1261 x 813. Plenty of room to fit on a 1920 x 1080 monitor.

One of my colleagues in another state is telling me that the app extends beyond his taskbar. He has a 1920 x 1080 screen on his laptop. Windows 8.1. I’ve put text on my window indicating window size and position, did a build and sent it to him.

The frame work is reporting the correct size - 1261 x 813 but it is definitely extending into and beyond his task bar.

What might be going on? Is Windows doing some scaling? I’m not sure if he has a HiDPI display or not. How do I compensate for that?

Jon[/quote]

Contrary to Mac where the menu bar is a limit, in Windows apps can display windows under the taskbar. Why don’t you check the window position in Activate, and if it extends below Screen(0).AvailableHeight, just move it above ?

Because what his resolution is in terms of output is not what the Xojo framework is reporting it to be…

I’m checking for available height and all. But I’m getting his available height is closer to 1920. But in reality it isn’t. There’s scaling going on.

Under windows 8.1, you can go to control panel -> display and there is a slider for changing the size of all things on the desktop…
perhaps this has been used to make windows larger than normal.

[quote=177914:@Chris Carter]Under windows 8.1, you can go to control panel -> display and there is a slider for changing the size of all things on the desktop…
perhaps this has been used to make windows larger than normal.[/quote]

Nope. Would have been a nice explanation. But that also changes the AvailableHeight.
When I go half way accross the slider, Xojo reports 824 AvailableHeight instead of 1040.

[quote=177918:@Michel Bujardet]Nope. Would have been a nice explanation. But that also changes the AvailableHeight.
When I go half way accross the slider, Xojo reports 824 AvailableHeight instead of 1040.[/quote]

Shame ! - Thought I might have had it then…

The only other thoughts I have on this are…

It may be the next option down on the Display settings ( [ ] Let me choose one scaling level for all my displays )
( be careful playing with this - it can be tricky to get back to your exact old desktop setting in terms of background and text style - it certianly messed up mine last time I played with it )

also…

The window size of 1261 x 813 is actually taller than that as the (window).height does not include the top bar and borders - though I don’t think by enough to cause this issue.

Thanks guys. Agreed the actual window size has the size of the frame to take into account. But I set my Parallels VM to 1920x1080 and loaded my app and there was tons of room. But on his there wasn’t. He has the display size set to medium. He can set it to small and the window fits fine then but then his text is so small he can’t read it.

So I wonder if he is not running in the native resolution of the display. But yet, the AvailableHeight property should report wha that is and if it is less than the size of my window, my window adjusts downward to fit.

So I am stumped.

Stupid Windoze. This doesn’t happen in OS X! :slight_smile:

[quote=177926:@Jon Ogden]Thanks guys. Agreed the actual window size has the size of the frame to take into account. But I set my Parallels VM to 1920x1080 and loaded my app and there was tons of room. But on his there wasn’t. He has the display size set to medium. He can set it to small and the window fits fine then but then his text is so small he can’t read it.

So I wonder if he is not running in the native resolution of the display. But yet, the AvailableHeight property should report wha that is and if it is less than the size of my window, my window adjusts downward to fit.

So I am stumped.

Stupid Windoze. This doesn’t happen in OS X! :)[/quote]

If I understand right he is using the same setting I was describing before that has an available height of 824. Actually, the scale offers small,medium and large.

I thinkyou guy is simply using a taller taskbar than the default 40 pixel one. With an 80 pixels high taskbar, at medium, availableheight is 783. Less than your 813 window. There you are. Congratulation, the universe has provided a better idiot.

As for a comparison with OSX, you just encountered the equivalent of Retina. When I switch my 1920x1080 iMac 2011 display to retina, I get a 960 x 540 display.

The difference between Windows and OS X is simply the control panel that lets the user choose the scale.

No. It’s not. He has sent me pictures. And I check the height of the task bar as well. I have a method that does all that and gets it from WMI.

The Xojo Framework is reporting the screen size as 1080 NOT 824. And his taskbar looks normal size in the pictures.

The framework should report the available height but it’s not then.

[quote=177934:@Jon Ogden]No. It’s not. He has sent me pictures. And I check the height of the task bar as well. I have a method that does all that and gets it from WMI.

The Xojo Framework is reporting the screen size as 1080 NOT 824. And his taskbar looks normal size in the pictures.

The framework should report the available height but it’s not then.[/quote]

If he sent you screen copies showing you the phenomenon, you got every means of checking the actual height in pixels of both the screen and the window. It is impossible that a 1080 high screen cannot accomodate an 813 high window without a valid explanation.

What is the actual height of the screen in these pictures ?

Well, I am telling you that Xojo is reporting an available height that is different from what is happening in real life.

I’m going to do a new build for him with the available height printed on the window as well.

FYI - I just checked the height in pixels of his screen shot and it is 1080. But the window height the Xojo framework is reporting is 813. The window is extending slightly past the bottom of his screen…

But you can also measure the actual height of the window on the picture, right ? Is it 813 or something else ? It would not take much for an 813 high window to go lower than the taskbar. Just a top of 267…

Could you post one of these pictures ?

I will. Unfortunately, I can’t get into my server right now so that I can have a URL for it. I’ll do it this evening…

[quote=177951:@Michel Bujardet]But you can also measure the actual height of the window on the picture, right ? Is it 813 or something else ? It would not take much for an 813 high window to go lower than the taskbar. Just a top of 267…

Could you post one of these pictures ?[/quote]

In Preview on my Mac, I can see that the pixel count from the inside of the window frame edge of my app to his task bar is 996 pixels. The app looks like it’s been magnified.

I’ve seen issues with other programs when Windows does the screen scaling. IBM Notes is one such program. It gets completely hosed up by the scaling effects in Windows. I had to turn it off on a laptop I was working with and then manually set the resolution.

This is very strange.Scaling on Windows actually reduces the number of points available on the screen. I am not aware of any way to increase the size of one app window. I look forward to see the picture.

My Akoya laptop with Windows 8.1 have 120 dpi as the screen resolution.

I do not know how this goes with Xojo, but screen shots taken on Windows 8.1 opened with Preview on OS X appears… larger (a bit like Retina images).

BTW: I too habe a Full HD monitor size (1920 x 1080), but on a 11.6" screen… Aïe my old eyes…

OK. Here’s the image. So the vertical resolution in pixels is 1080. The size of the window is being reported on the window as 813.

You tell me what’s going on… :\

i think the client must have set the text size to large. On windows7, you right click on the desktop, click on screen resolution, the click on Make text and other items larger and smaller and see what is the value inside ??

I was actually going to ask about this sort of thing. With my game, if the system font is set above 96 DPI (which I believe is the default) then the screen isn’t formatted correctly, and things are pushed off. Is there a way to compensate for this internally in your app, maybe set the app itself to use 96 DPI, etc?