LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control of Front Panel Size

Hello everyone, I’m not sure if anyone has the perfect solution, but any good one would be helpful. Let me try to explain.
An application is running on a Windows tablet PC with an apparent resolution of 800x1200 pixels; in practice, it’s a bit more vertically (1280). The issue is already making the front panel with resolutions that don’t fit on a normal monitor, but once this is overcome, some problems appear. When you rotate the tablet, the applications also rotate, causing the front panel to break, and when you return to the original orientation, it doesn’t come back to its initial state. Does anyone know how to lock this in the front panel of a VI?
The second problem is that the tablet’s resolution is very high, and the manufacturer recommends using a 125% scaling to make it usable, as otherwise everything is too small and hard to manage. However, the front panel has already been designed to occupy the maximum space, with all controls well-positioned. If the user changes the scaling in Windows, the entire front panel becomes disorganized, or part of it goes beyond the visible screen range. Does anyone know of a way to prevent this scaling from affecting the front panel of a VI?
Thanks.

0 Kudos
Message 1 of 5
(675 Views)

Hi Jordi,

 


@JordiJulian wrote:

An application is running on a Windows tablet PC with an apparent resolution of 800x1200 pixels; in practice, it’s a bit more vertically (1280). The issue is already making the front panel with resolutions that don’t fit on a normal monitor, but once this is overcome, some problems appear. When you rotate the tablet, the applications also rotate, causing the front panel to break, and when you return to the original orientation, it doesn’t come back to its initial state. Does anyone know how to lock this in the front panel of a VI?


You can design a frontpanel for 1200×800 pixels and another one for 800×1200 pixels. Then you load the needed frontpanel (VI) into a subpanel whenever the screen orientation changes!

(I recommend to not use the automatic scaling option provided by LabVIEW…)

 


@JordiJulian wrote:

The second problem is that the tablet’s resolution is very high, and the manufacturer recommends using a 125% scaling to make it usable, as otherwise everything is too small and hard to manage. However, the front panel has already been designed to occupy the maximum space, with all controls well-positioned. If the user changes the scaling in Windows, the entire front panel becomes disorganized, or part of it goes beyond the visible screen range. Does anyone know of a way to prevent this scaling from affecting the front panel of a VI?


The screen scaling is a Windows settings and affects all windows. AFAIK you cannot prevent its effects on your frontpanel…

 

You should set the scaling to a known value and never change it afterwards: then design your frontpanels for that known configuration!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(660 Views)

Thanks Gerd:

 

one aditional question, for both questions is more or less the same:

is possible programatically detect the rotation of the tablet, and is possible to know the value of the windows scalation?

 

and after this act accordingly.

0 Kudos
Message 3 of 5
(654 Views)

Hi Jordi,

 


@JordiJulian wrote:

is possible programatically detect the rotation of the tablet,


This should be reflected in the monitor size - you can read this in LabVIEW using a property node:

I never did so on tablets, and cannot guarantee LabVIEW recognizes changes of the monitor resolution dynamically.

Atleast it recognizes the 3rd monitor in my setup when I open/close my laptop - the first two monitors are attached to the docking station…

 


@JordiJulian wrote:

is possible to know the value of the windows scalation?


This is a Windows-internal setting. I don't know where it is exposed.

I guess you can read about this in the Windows documentation in (formerly known as) MSDN

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(646 Views)

I found some option for know the escale of system or monitor:

 

making a call of a user32.dll

 

Functions GetDpiForSystem and GetDpiForMonitor 96 is de reference value equivalent to 100%.

 

But the number of real pixels resolution  in the screen ar the same, and create a new front panel with this new aspect proportion is dificult think

0 Kudos
Message 5 of 5
(625 Views)