LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to maintain the resolution of vi in different monitors

Hi friends,

 Using Labview 8.0 i created an exe of the application. every vis i set  the  vi properties just like the attachment below. after installing the exe in a higher resolution monitor, when i open a  sub window - 1st time its comming correctly but after stoping that sub window , if i open that subwindow once again than the resolution(size of the vi) of the window is changing.

in my application i want to take the print out of that window , 1st time print out is comming correctly but due to this resolution problem next time it taking 2 pages for printing.

please help me for that.

 

Nikhil 

0 Kudos
Message 1 of 8
(6,451 Views)
Without your code, it is difficult to say what the problem is.  From your brief description, you may have a font size issue (the fonts on the two machines are different).  For example, if you use default fonts and one machine is running Windows XP and the other Vista, the font size changes.  However, fonts usually resize controls, not the panel size.  Please post as much of your code as you can so we can help you debug it.
0 Kudos
Message 2 of 8
(6,419 Views)

Hi DFGray,

  This is related to the front panel of a vi. Monitor(17'') with 1028 by 1024 resolution, the front panel is working perfectly. but in bigger size monitors( 19'') the font  size and size of objects in the front panel is changing...( ex: size of graphs and all). is it possible to capture the current resolution of a monitor and programattically assign this to the front panel. 

0 Kudos
Message 3 of 8
(6,376 Views)

Have a look at this thread,which discussed the similar problem.

http://forums.ni.com/ni/board/message?board.id=170&thread.id=411373&view=by_date_ascending&page=1

http://digital.ni.com/public.nsf/allkb/048C31D73E8EC91286256E440063E1BB?OpenDocument

Message Edited by Baji on 05-27-2009 10:41 AM
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 4 of 8
(6,374 Views)

I want to second Baji's suggestion.  Check out those links.

 

To directly answer your question, you can programmatically change the size of almost any control and panel in LabVIEW.  Use the VI server property nodes (there is, unfortunately, no common method for all front panel objects).  As the links Baji pointed you to say, you can also set VI properties to automatically scale things, although in practice, this has limited utility.

 

What confuses me is why your application window changes size when the app runs.  To figure this out, you need to post your code so we can look at it.

0 Kudos
Message 5 of 8
(6,344 Views)

This behavior, and the ugly graph cursor display introduced in labview 8.0 is the two properties I dislike most in labview. The problem with your font is that Labview scales the font size depending on the settings selected in Display properties->Appearance->Font Size. If the defualt fonts are used. You find these windows settings by right clicking in the on an icon free area in your desktop. The font scaling will apply to the standard font types in Labview like application, system, and dialog. If the font settings are different in your development computer and the target computer, the front panel may look god on your computer, and totally messed up on the target computer. This will also occur if you have used some fancy fonts not installed on the target computer.   

 

One solution to this problem modify the Labview ini file so both the target and development system have the same font settings. You will find more about it here http://wiki.lavag.org/LabVIEW_configuration_file/Fonts . A more cumbersome method is to not use application, system, or the dialog font style. If you are distributing an exe application you may create your own labview.ini file with the correct settings for the standard Labview fonts, and include it in the installer. Anyway I can not see why this "bug" not has been fixed. It has been like this at least since Labview 3.1. If you write a Word document you certainly not want the font size to change depending on the windows settings.

Here is the what I have inserted in the Labview ini on my computer. Is also include this as custom ini file then I make applications. The labview.ini is pure text 

 

FPFont="Tahoma" 13
BDFont="Tahoma" 13
appFont="Tahoma" 13
dialogFont="Tahoma" 13
systemFont="Tahoma" 13

 

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 6 of 8
(6,333 Views)

Hello, I have a question how you change labview .ini file.

Did you just add font settings to the end of the old Labview.ini file, or it needs to be in specific location?

 

Thank you

0 Kudos
Message 7 of 8
(5,403 Views)

You can add them at the end, the beginning, or anywhere.

0 Kudos
Message 8 of 8
(5,391 Views)