Troubles with report and monitor resolution

I am trying to write my first Mac OSX app (I usually work on Windows platform) on a MacBook Air 11” running Mojave.
In my app I have a report: when I connect to my MacBook an external monitor and I use its higher resolution, everything in the report is much bigger than the original size.
This force me to use the original resolution of my MacBook (1366 x 768), loosing the advantage of having an external monitor with higher resolution.
Is there a way to avoid this?
Thanks you all!

What are the screen size (in inches) and resolution (in pixels) of that monitor ?

Why is this bothering you ?

Edit: another question
And your other windows have the same size in both monitors ?

It’s a smart TV: 49", max resolution 3840x2160

The font is so big that it’s unreadable: imagine that you print a A4 report with a 120 point font

All the windows are ok in the new resolution: it’s only a report problem.

Seems a true bug for me.

A little over my 13" screen (3660 x 2100) / MacBook Pro (mid 2014).

Sorry.

The max resolution of the smart TV is 3840x2160, but the resolution used when I connect my MacBook to it is 1920x1080

you must be in video mirroring, the resolution is adapted to the lowest display
what 11" macbook air model do you have ?
try to have the 2 displays different (system preferences - monitors - disposition - uncheck mirror)
you then will have max resolution on the two displays.

Hi Jean-Yves.
My 11" MacBook Air is an Early 2015.
I have done what you suggest in your post, and this is what I wanted!!!
The only thing I did not understand well is how to prevent a window from being opened on the Mac monitor instead of on the TV.
I see in the Disposition page that there is a button (“Raccogli finestre” in Italian, “Collect windows” in English), but I don’t understand well how it works.
Thank you so much for your help!!

https://documentation.xojo.com/error-0>/screen.html#screen-screencount and https://documentation.xojo.com/error-0>/screen.html#screen-screenat

It appears your smart TV is using 4K resolution. In macOS, when the display says “like” 1920x1080, then your app is now using a ScaleFactor of 2.0, instead of 1.0 that you would have on your MBA screen.

Maybe check that you have Supports Hi-DPI turned on in your project?

I hope that helps.

In the Properties pane for each window, set them to be Open in the Main screen (something like that):

Behavior → Default Location → Main Screen.

I just checked with Xojo 2019r3 for the exact US words.

[quote]Jean-Yves Pochez[/quote]I am using Xojo 2019r1.1

[quote]Scott Cadillac[/quote] Yes, Scott: my smart TV is using 4K resolution, and my project has the property “Supports Hi-DPI” set to ON

[quote]Emile Schwarz[/quote]I am using Xojo 2019r1.1: Default Location is the same as Placement?

[quote=471562:@Nedi Freguglia]Jean-Yves Pochez

I am using Xojo 2019r1.1[/quote]
so the methods are screen(index) instead of screenat(index)
and screencount is the same

Well, Jean-Yves: how could this help me to display a window on the internal monitor rather than on the external?

first you have to know which monitor is the internal one - its not always screen(0)
screen(0) is the one identified in the displays control panel as the one with the menu bar (which a user can change)
there is no property in Xojo that tells you which is the internal

after that putting a window on that monitor is a matter of setting the windows BOUNDS to something that fits on the screen based on that screens available top, available left, available width and available height

On the off chance that you mean on your primary or default display in OSX itself, here’s a shot article on changing it:

If your goal is to open your Xojo app on your Macbook Air (2015) screen, rather than your 4K monitor, maybe something like the following in your Window Open Event will do the trick (code not tested):

Var iCount As Integer = Screen.ScreenCount - 1 For i As Integer = 0 To iCount If Screen(i).ScaleFactor < 2.0 Then // 4k monitors will be ScaleFactor=2.0, lower values are standard resolution screens (pre-Retina) Self.Top = Screen(i).AvailableTop Self.Left = Screen(i).AvailableLeft Exit For i End If Next
The above “should” open the app in the top-left corner of your screen, regardless if the Air is configured as your default screen.

I hope that helps.

one thing to note is that the built in monitor on an mbp is also a 2x resolution - most have been for about 7 or 8 years

@Nedi Freguglia :

Did you tried that ?

Main screen usually is the screen where the MenuBar resides; I suppose it is the MacBook in your case (this have to be checked) ?

For sure, but in this case @Nedi Freguglia is using an Early-2015 Macbook Air 11". I happen to have the same model (albeit running High Sierra) and I use it frequently for Xojo programming and it always runs apps at ScaleFactor 1.0, no matter how I change the display settings.

Maybe Mojave would offer more scale choices, but I would be surprised for a 1366 x 768 resolution screen. But I’ve been known to be wrong before.

sure
that will work for his set up - but not a lot of others

a property (or several) on the “Screen” class that gave us that info, and maybe some other useful bits, would be handy

I’d submit such a feature request but my list of needs review cases just keeps growing so maybe someone else should ?