02-13-2012 07:51 AM
I have a labview app that I developed for a 1920x1080 which poulates most of the screen. How do I make this play on a smaller screen size like a 1024x768 resolution one? What is the best means of supporting both screens?
Solved! Go to Solution.
02-13-2012 08:11 AM
You have a few options, none of them really nice.
In VI Properties >> Window Size there are two check boxes for "Maintain proportions of window for different monitor resolutions" and "Scale all objects on front panel as the window resizes". Try these. They are the easisest things to do. However, due to the fact that fonts do not scale and many controls and indicators are sized according to the font they display, things do not scale as nicely as you might like.
Use the Property Node: Application.Display.AllMonitors. Its output is an array of clusters with data about the displays. Then using that information, you can resize the display programatically. A related option is to have GUI subVIs. Create a subVI with the GUI set the way you want it for each size of monitor you will be using. Select the subVI to be used in a particular situation according the the display size(s) returned by the property node. This last option is the most work, but gives you complete control over the user interface.
Lynn
02-13-2012 09:02 AM
Thanks Lynn, I think the last is my best approach. unfortunately, I will have to pass all my control refs from the subvi to the main program now which will be easier in my program because I already pass all of my main front panel controls as cluster of refs into all my subVIs.How do you mechanize the showing of the subvi front panels - on top of the main programs?
02-13-2012 09:14 AM
The main program will not have its front panel visible. It will call the selected GUI subVI using VI server methods - the Invoke node. Look at the detailed help. It will probably be useful to write some little test VIs until you get all the details worked out.
Lynn
02-13-2012 08:18 PM
Looks like I can use a VI Server Front Panel Minimized method or a transparency property value of 100. Any benefit in using one over the other because I cant see one...?
02-14-2012 12:43 AM
I'd recommend keeping a desktop picture like this handy for testing what your VIs look like at different screen resolutions:
Might need to use a photo editor and draw your own. I have one that scales from the top-left, so I can just drag the window resizer to the different rectangles and see what's visible and what isn't.
02-14-2012 06:31 AM
Like SnowMule, I like to have a handy reminder of the screen sizes. One technique I sometimes use is a blank VI with rectangular box decorations set to the screen size(s). This can also be used on blaock diagrams if development is done on multiple computers.
Lynn
02-14-2012 06:45 AM
thanks fot the tip but I am looking for an answer/recommendation to my question about the vi server approach.