04-21-2011 01:53 PM
Hi All,
I am building my VI on a computer that has a resolution of 1920x1200. When I built an executable and tried it on a computer that has a resolution of 1280x1024, some of the text characters are overlapping, texts on a button (i.e. STOP, EXIT) are overfilling the buttons, graph palettes are overlapping cursor legends, etc. I have tried to play with the VI properties -> Window Size, Window Appearance, and Run-Time Position, and changed some of the options (including decrease the panel size), but still no luck with it. I basically would like to keep the appearance of my VI the same even if I build it and run it on another computer that has a different resolution.
Please help!
Lynniz
04-21-2011 02:12 PM
Hi Lynniz,
the different appearance is most likely caused by different system fonts.
When using system/dialog/application fonts (default) the appearance will change based on operating system options (see e.g. here: http://digital.ni.com/public.nsf/allkb/569A6D181945819E8625697B007272B6).
Solutions are to use fixed fonts (Arial, Tahoma, ...) or to specify the fonts in the application's ini file.
Do you use front panel scaling (scale all objects)? That might also cause such problems.
Hope this helps,
Daniel
04-21-2011 02:21 PM
Hi dan_u,
I did select the option to "scale all objects on front panel as the window resizes". If I don't, I would need to scroll up and down or left and right to see all the controls and/or indicators on the front panel. I will try to change the font to something other than application fonts (what I have currently). By the way, what is the procedure to ensure your executable will appear the same as your VI on another machine? I want to make sure that I am not missing anything.
Thanks,
Lynniz
04-21-2011 03:33 PM
In this case the scaling might have more effect than the fonts. Resizeable applications are not so simple to develop (in LV). Here's a good KB article which describes the problems, also the font problems you see (since the font size isn't changed it is too big on the smaller resolution): http://digital.ni.com/public.nsf/websearch/048C31D73E8EC91286256E440063E1BB?OpenDocument
I would tend towards the solution to develop the application for the smallest resolution you expect (without scaling), which will obviously result in a non-fullscreen application on higher resolution. That's what I do for my applications. If I allow front panel resizing, the I use scaling only for one object (usually a graph).
04-22-2011 07:23 AM
Hi dan_u,
When you said you usually develop the application for the smallest resolution, do you mean you actually changed your screen resolution to a smaller resolution and then build your VIs on the smaller resolution? That's what I tried, and it seems to be working. I still have to try it out on another computer.
Thank you,
Lin
04-22-2011 12:12 PM
Its not going to work developing a UI on 1920x1200 and executable on a smaller screen, 1280x1024. Nobody can develop an application this way, the pixel won't fit. Set your screen size to 1280x1024 and setup your UI. Otherwise, specify a minimum screen resolution (in your case 1920x1200.
Enable rescaling controls and indicators rescales only controls and indicators not your entire UI.
04-22-2011 12:51 PM
Usually I don't change my screen resolution, I just set a minimum window size in the VI properties (matching the smallest resolution or smaller), then resize the VI front panel window to minimum size to develop.
04-22-2011 01:54 PM
Hi dan_u,
I think that's what I did at first, but it didn't work for some reason. Please verify:
1. VI Properties -> Window Size-> I set it smaller than the screen resolution of my deployment computer
2. Checked "Maintain Proportions of window for different monitor resolutions"
3. Scaled and design my objects based on that window size I have sent in step one.
04-22-2011 01:58 PM
Thanks richjoh, that's pretty much what I did to make it work. I just find it is bothersome to me that each time you develop a VI for a different computer, you first have to find out the screen resolution of that computer, and also changes your current screen resolution to match that one. Thanks!
04-22-2011 04:12 PM - edited 04-22-2011 04:13 PM
@Lynniz wrote:
Hi dan_u,
I think that's what I did at first, but it didn't work for some reason. Please verify:
1. VI Properties -> Window Size-> I set it smaller than the screen resolution of my deployment computer
2. Checked "Maintain Proportions of window for different monitor resolutions"
3. Scaled and design my objects based on that window size I have sent in step one.
I have no experience with 2, but I wouldn't select that as it might distort the FP. Just create a VI FP with a front panel window size <= deployment PC resolution. No fancy options, no resizing of FP objects, no maintain proportions.
[If you want the application to run fullscreen on any resolution have a look at the KB article I linked in an earlier post.]