Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 6 Monaten
Letzter Beitrag:
vor 2 Jahren, 6 Monaten
Beteiligte Autoren:
André Labuschagné, Arie, Paulo Oliveira

WDM - Detecting Screen Size Of Device On Load

Startbeitrag von André Labuschagné am 26.11.2015 11:39

Hi All

Subject says it all. How does one detect the screen size of the device during the loading of an app - when the user tries to run it?



did you try with SysScreenRectangle?

von Paulo Oliveira - am 26.11.2015 11:52
The help says WM will load the required layout for you, but it's not working for some reason in my situation.

I use SysXRes() together with WinChangeLayout() in de opening section of a window

von Arie - am 26.11.2015 12:21
Thanks for that Paulo and Arie. I have not tried any of those.

Basically we have designed the Android smartphone against the Samsung S6 and want to warn the user about screen size and not allow the app to run if the screen is too small.


von André Labuschagné - am 27.11.2015 07:17

the option in WM to use different "window layouts" works quite good.
You can redesign your window for a smaller screensize. I.e. make controls smaller, change positions or even make them invisible in a certain layout.
All code remains the same. And even if you don't want that, you can check the current screensize and run different code if necessary.

It is my humble opinion that all this is usefull only if you don't want to change the workflow of your application. An app designed for a S6 would also run on a S5 with the same user experience I believe,
But you should not use the same workflow on let's say a 10 inch tablet. Because the screen differs so much, I think you can put more controls/logic on one screen. And make life easier for the user do the job with a minimum of scrolling and going back/foreward from one window to the other.,

von Arie - am 27.11.2015 09:22
Hi Arie

The problem is that the windows will not scroll if there are scrollable controls on the window. So I have experimentally gone with a screen ratio of X to Y as the base test. If it is not meet the minimum requirement then the user gets a message that the app is not compatible with the device.


von André Labuschagné - am 28.11.2015 21:23
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.