04-22-2008 10:59 AM
04-24-2008 08:26 AM - edited 04-24-2008 08:32 AM
I have had the exact situation, where an application that had 30+ screens could be used on 800x600 or 1024x768. What I settled on was to programmatically re-center the GUI rather than programmatically re-sizing it. The good thing is, you (and me) are not switching between two grossly dissimilar resolutions, so you don't really need to resize the controls to make them usable.
I had a setup button for the user to choose screen resolution, and I threw this setting in a Global. In each screen, I programmatically centered the GUI as shown in the JPG.
edit, add-on: The -60 and -40 in the input cluster constant just so happened to be the "center" of the screen I was working with for 800x600. You'll have to find the center (actually I think it's the upper left corner) of each screen and plug the numbers in accordingly. It's easier than it sounds. I have VI that will find values for you if you want it, but I usually just read the Pane Origin Proerty Node first, then use the numbers, which in this case were -60 and -40.
04-24-2008 08:56 AM
04-24-2008
09:10 AM
- last edited on
07-08-2024
02:21 PM
by
Content Cleaner
You can also use the screenres.dll from here http://zone.ni.com/devzone/cda/epd/p/id/5421 to query the actual resolution of the screen your application runs on and then use that information to resize or center your GUI automatically.
Regards, David