LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitor Resolution and VISTA

Is there a tutorial or knowledgebase that explains the issues involving monitor resolution; especially as applied to VISTA?  I installed a built application that was developed with VISTA (LabVIEW v.8.2.1) on a computer running WIN-XP and the monitor resoution is fouled.  I heard somewhere that resolution can be controlled programmatically (or automatically) when an application starts.  How is this done?  And then how is the resolution returned back to the way it was when the application is closed?
 
Thanks,
 
Dave J.
0 Kudos
Message 1 of 8
(4,429 Views)

Hi Dave-

Check out the following DevZone example programs:

Changing monitor resolution programatically using LabVIEW
Changing Screen Resolution Programmatically From LabVIEW
Scaling VI Fonts With Monitor Resolution

There are also some features that allow you to auto-scale VIs. If you go to VI Properties for a given VI, under the Window Size category this is a checkbox with the option "Maintain proportions of window for different monitor resolutions". This basically resizes the bounds of the VI itself when opened on machines with different resolutions, but it does not actually scale any objects. There is another option in the same category titled "Scale all objects on front panel as the window resizes" which will actually resize front panel objects as you resize the window.

Hope this helps!

Drew Pierce | District Manager, Central Texas | National Instruments
0 Kudos
Message 2 of 8
(4,404 Views)
Hi Drew,
 
I read through the various documents and am a little overwhelmed with the various issues.  I'm overwhelmed becaue I have little time to sort through all the implications of changing screen sizes for any computer that an end user may have.  This particular application has several subvi's (via VI Server) that displays a variety of front panels, user selected clusters and many objects.  So I'm going to stick with 1024x768 monitor resolution and call it good.
 
My original question involves two issues.  1) How to programmatically work with differing monitor resolutions, which you have answered.
 
2)  There seems to be a difference between Win-XP and VISTA when displaying a front panel.  Please take a look at the attached.  These screen shot shows a subvi running with the main vi in the background.  The upper screen shot shows how the application runs using VISTA.  The application was developed and built using VISTA (LV v.8.2.1).  The application was then installed on a WIN-XP Pro computer.  There are some small descrepancies in how the front panels are displayed.  Is there something I can do to resolve the differences?  In other words is there something I need to understand?
 
Thanks,
 
Dave J.
0 Kudos
Message 3 of 8
(4,383 Views)

Hi Dave-

Thanks for attaching the PDF of screenshots. I found another situation where a customer had control/indicator placements slightly altered due to font issues between XP and Vista. The following solution is documented in the KnowledgeBase article for LabVIEW 8.2.1 Readme Files.

"Because the default fonts on Windows Vista are different than the default fonts on previous versions of Windows, you might notice cosmetic issues, such as overlapping or truncated text strings, in VIs and LabVIEW dialog boxes. To correct this problem, change the theme of the operating system to Windows Classic in the Theme Settings dialog box and then restart LabVIEW. Select Start»Control Panel»Appearance and Personalization and click Change the theme to display the Theme Settings dialog box."

Vista is changing the default application font to something larger, which causes text to grow in LabVIEW front panels and block diagrams that make use of the application font, and this can sometimes affect the boundaries of objects. The opposite effect can happen when going from Vista back to XP. NI is choosing not to change anything for the API of LabVIEW since doing so would cause mixed results with upgraded apps and new controls and so on.

Hope this helps!

Drew Pierce | District Manager, Central Texas | National Instruments
0 Kudos
Message 4 of 8
(4,314 Views)

Droopy,

are you saying that an application buildt with LV8.2.1 under Vista with "application font" looks different from the same application buildt with XP???

There is a general approach other than forcing Vista user to use the "window classic" theme???
It seems a serious "upgrade/downgrade" issue, considering that XP is still very popular, but Vista is growing up (from now on every new PC has Vista inside...)

0 Kudos
Message 5 of 8
(4,187 Views)

On May 25th I sent a pdf that shows how the screen looks different when using XP and VISTA and is included as part of this thread.  The two installations are identical and was built as an application using LV 8.2.1.  I need to emphasize that the VISTA screen shot was with the VISTA theme set to Windows Classic.  The result when the theme is set to Windows VISTA is similar but worse.  It's worse because in addition to the panel placement problems, the front panel text items are fouled.

Here's the story.  Last December the customer released an order for us to develop a custom application.  Last March we released the application with the specification that Win-XP be used for the OS.  At that point VISTA was not released by Microsoft.  The customer delayed getting their computer until recently and you guessed it; it was a new Dell laptop with VISTA.  It gets worse.  They saw that we specified the use of Win-XP and they naively installed Win-XP on top of VISTA or somehow replaced VISTA.  Well it doesn't work and of course Dell cannot support it.  Apparently it does not work because we cannot expect the laptop drivers to work with the older OS.  As an accommodation to the customer, I'm restoring the laptop back to VISTA

In the mean time I modified the application to programmatically determine the OS used and make the necessary adjustments.  I thank and appreciate the NI programmer who set up the FP.WinBounds and Position property nodes.  The problem may be seen as a minor cosmetic issue.  However, the customer paid a lot for the application and sometimes image is everything.

And now I ask a humble question.  Is this craziness what we went to school for?  Anyway I prepared this replay as an update in case anyone is interested.

Thanks,

Dave J.

0 Kudos
Message 6 of 8
(4,167 Views)

Dave J., I saw your pdf.

Another issue is: Do we have to rebuild our old application?????? WTF?!? Smiley Mad
If you develop an application, that was ok, but suddenly more and more people will run Vista, what can we do?? it's the hell!

Dave, can you please post a piece of code to show how to programmatically determine OS and in case of Vista/Xp do some resize/change font or something??

A possibile general solution for people still building inside XP:
enlarge a bit the space for the strings/text, so that in case the application run on Vista, the little extra space can fit the text.
This would require at least to run once the final application on Vista, to see if it's ok.
What do you think of this?

I think that forcing people to turn Vista to classical theme is a very bad solution. If I buy Vista, I want his new look and feel, FX and so on, and many people think so.

0 Kudos
Message 7 of 8
(4,159 Views)

Yes, apparently we have to rebuild to use VISTA.  However, what’s worse is that (as far as I can tell) some program changes are required if you want your application to appear the same when run from XP or VISTA.

For me there are two fundamental problems with differences between XP and VISTA.

1.  There are significant changes in the way text is displayed in VISTA when the theme is set to Windows Vista.  In my case, some of the captions overrun their limits and are displayed in the object field.  This problem is fixed when the theme is set to Windows Classic.  I agree that having the end user set VISTA to Windows Classic is an undesirable fix.  However, for my current applications I can have the end user set the theme to Windows Classic.  I’ll simply blame the problem on Microsoft like everyone else.

2.  Regardless of setting the theme to Windows Classic or Windows Vista, there are differences in the placement of graphical objects.  For my application, I have to programmatically change the location of a cluster in the main vi and the front panel of displayed vi’s.  Attached are the requested details on how I do this.  Please let me know if there is a better way.

I hope that eventually the trouble with Windows Vista theme and font display will be resolved.  I cannot programmatically change all the object text (i.e. captions) to compensate.  That would be too painful for me to bear.  I don’t think enlarging the area for text is viable because it’s unpredictable and I have some applications with hundreds of front panel objects.  Trying to compensate for text enlargements would send me to the nut house.

Setting the theme to Windows Classic is inappropriate but I have commitments and deadlines.  The show must go on…

Keep in touch,

Dave J.

0 Kudos
Message 8 of 8
(4,144 Views)