LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Text Rendering in LabVIEW

I wish NI provided an easier solution for this. I'd trade Nigel for non-fuzzy windows and more modern and flexible controls.

0 Kudos
Message 11 of 20
(213 Views)

@FlatCat wrote:

I wish NI provided an easier solution for this. I'd trade Nigel for non-fuzzy windows and more modern and flexible controls.


If you're talking about the manifest, it's here in the Build Properties, and it seems to work, indeed:

2026-10-11_170947.png

So, the whole part about using mt.exe and Python/Rust code to embed the manifest is not applicable. There's a simpler solution (the manifest itself was shown in the comment above).

And, by the way, this won't be appended to the existing manifest; it will replace it completely:

2026-10-11_171704.png

good to know.

Message 12 of 20
(202 Views)

Cool! I did look through the Build Spec for a mention of manifest files, but didn't inspect the Security section thoroughly enough. I was thinking more along the lines of a checkbox in the build spec that says something like "handle HiDPI more gracefully", and which would put the relevant text into the manifest file. But this at least goes part of the way. 

0 Kudos
Message 13 of 20
(186 Views)

The manifest using PerMonitorV2 would require a lot of programming to have the app scale properly?

 

NI's recommendation is to set the Scaling performed by to System (Enhanced). Then you don't have to do anything in the code. Google tells me that this is the manifest for that:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings>
<!-- Tells Windows that the app is not DPI-aware, forcing OS bitmap scaling so the UI doesn't become microscopically small -->
<dpiAware xmlns="http://microsoft.com">false</dpiAware>

<!-- Enables GDI scaling, which is the internal Windows name for the "System (Enhanced)" compatibility mode -->
<gdiScaling xmlns="http://microsoft.com">true</gdiScaling>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

 

<dpiAware>false</dpiAware>: Tells Windows that LabVIEW is pixel-based and cannot scale itself. Windows handles the layout scaling so your buttons and windows stay the correct physical size.

 

<gdiScaling>true</gdiScaling>: This is the magic flag for System (Enhanced). Instead of stretching the UI like a low-res bitmap, Windows dynamically rerenders fonts and standard GDI vector graphics at the monitor's native resolution.

Certified LabVIEW Architect
Message 14 of 20
(119 Views)

@thols wrote:

The manifest using PerMonitorV2 would require a lot of programming to have the app scale properly?

 

NI's recommendation is to set the Scaling performed by to System (Enhanced). Then you don't have to do anything in the code...

 

<gdiScaling>true</gdiScaling>: This is the magic flag for System (Enhanced). Instead of stretching the UI like a low-res bitmap, Windows dynamically rerenders fonts and standard GDI vector graphics at the monitor's native resolution.


If a blurry UI is acceptable, then yes, of course. At first glance, I can't recognize any advantages of GDI scaling, at least visually.
0 Kudos
Message 15 of 20
(72 Views)

NI's recommendation of setting the High DPI override to System Enhanced definitely makes a difference. It's subtle, and yet to my eye makes the UI more crispy and appealing.

The question is how to get the corresponding element, <gdiScaling>true</gdiScaling>, into the built app's internal manifest. I can find the exe's manifest just by searching through the contents of the exe file with a text editor (TotalPE2 doesn't let you copy the manifest text that it shows you). The manifest is quite long, and so I don't imagine you can just replace it with something short that only contains the scaling element. I will try extracting the manifest from the built exe, adding the scaling element to create a new manifest file, and then rebuilding the app using that file in the Embed Manifest File option of the build spec. That is perhaps a naive approach. I can try mt.exe if it doesn't work.

By the way, the built app's manifest contains this:

 

<dpiAware>false</dpiAware>

 

 

 

0 Kudos
Message 16 of 20
(56 Views)

@FlatCat wrote:

The manifest is quite long, and so I don't imagine you can just replace it with something short that only contains the scaling element.

 


Last night, I played around with the manifest option in the Build spec. I tried ones recommended here and AI generated just for scaling. The application appeared to run normally even though I replaced a lot of the original file. I am guessing that if it is not in the manifest file then default values are used. Settings that may be important, according to AI at least, are:

 

An .exe manifest file is an XML document—either embedded as a resource inside the executable or placed alongside it as a separate app.exe.manifest file—that tells the Windows operating system how the application should be loaded, run, and treated. [1, 2]

Core Elements Contained in an EXE Manifest

 
  • Application Identity (assemblyIdentity): Uniquely identifies the app or assembly using a name, version, processor architecture, and public key token. [1, 3]
  • User Account Control (UAC) / Security Information (trustInfo): Specifies the privilege level required to run the application:
     
    • asInvoker: Runs with the same access token as the parent process.
    • highestAvailable: Requests the highest privileges the current user can obtain.
    • requireAdministrator: Forces the application to run with full administrator rights (triggering the UAC consent prompt). [1, 2, 4, 5]
  • Side-by-Side (WinSxS) Dependencies (dependency / dependentAssembly): Lists external shared components or runtimes the app relies on, such as specific versions of the Microsoft Visual C++ runtime (e.g., MSVCRT / Microsoft.VC90). [2, 6]
  • Operating System Compatibility (compatibility): Declares GUIDs indicating which versions of Windows the app was tested on and supports (e.g., Windows 10, Windows 11), which prevents Windows from applying legacy compatibility shims. [1]
  • DPI Awareness (dpiAware / dpiAwareness): Informs Windows whether the application handles high-DPI scaling natively or if the OS needs to scale the UI blurry/automatically. [1, 5]
  • Active Code Page (activeCodePage): Specifies whether the application uses UTF-8 as the process code page for globalization support. [1]
  • Private File Metadata (file): Outlines file hashes and COM classes, interfaces, or type libraries tied to private or isolated assemblies without needing old registry entries. [1, 3]
For detailed technical syntax and schema definitions, you can reference the official Microsoft Learn Application Manifests Guide. [1]
Are you trying to troubleshoot a specific manifest error, add admin privileges to an EXE, or inspect an existing manifest? Tell me what you are working on and I can guide you through it.
 
 
0 Kudos
Message 17 of 20
(43 Views)

All I want to do is add the tag <gdiScaling>true</gdiScaling> to the manifest. 

I am trying to extract the manifest from the exe file using mt.exe, but it is not working so far. 

0 Kudos
Message 18 of 20
(27 Views)

@FlatCat wrote:

All I want to do is add the tag <gdiScaling>true</gdiScaling> to the manifest. 

I am trying to extract the manifest from the exe file using mt.exe, but it is not working so far. 


Have you tried replacing it with the shortened manifest? I have not done in depth testing, but the dpi only manifest did not seem to give any issues. 

 

I can see issues if you depend on certain runtimes and/or specific versions of Windows. Below is a specific manifest for Win10+ (AI generated) (You could probably add the gdi tag inside of it.)

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity type="win32" name="MyApp" version="1.0.0.0" publicKeyToken="..." />
  <application>
    <supportedOS Id="{e2e72c69-5c40-4e00-9a0c-000000000000}"/>
    <autoElevate>false</autoElevate>
    <dpiAware>false</dpiAware>
  </application>
</assembly>

.  

0 Kudos
Message 19 of 20
(12 Views)

I tried your manifest file, but the application won't run. "The application has failed to start because its side-to-side configuration is incorrect." The same thing happened when I tried just adding my tag to the existing manifest of the unmodified built app. 

0 Kudos
Message 20 of 20