LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Forcing DPI Virtualization

Ren,

Thanks for your reply.  There might be something in the SDK that will work.  I have found a workaround.  By setting the font in the menu bar to NImenuMetafont (which is the default) and setting the text size to 12 you can read the menu height and backfigure the text resize value.

 

Float    TextResizePercent;

int         MenuHeight;

 

 GetPanelAttribute (MainPanel,ATTR_MENU_HEIGHT,&MenuHeight);
 TextResizePercent=(MenuHeight-6)/16;

 

When the percentage is set to 100% (no text resizing) the MenuHeight=22 (TextResizePercent = 1.0).

At 250% MenuHeight=46  (TextResizePercent = 2.5).

At 200% MenuHeight=38  (TextResizePercent = 2.0).

 

I don't think this is the perfect solution but, it appears to be working.  I have already gone through all my projects and changed all of the Metafonts to NIDialog (NIDialog is not affected by the Windows resize text funtion).  The only problem now is the text is very small on a 4K screen.  The 3DGraphs do resize and you must change the panel size and 3Dgraph size to accomidate (that is where the I have to know what the TextResizePercent is to adjust.

 

The only solution that I can think of for the small text in the regular panels on a 4K monitor is to do another UIR panel and watch the TextResizePercent value and load a bigger font panel or when the monitor Height is above 1440 or some value.  This has been very frustraiting and a lot of effort to fix all of this.

Thanks for your help,

Blake

0 Kudos
Message 11 of 11
(918 Views)