Example Code

Programatically size window to maximum size during run-time

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This VI uses property nodes to get the screen resolution of the monitor that you are using and inputs the bounds that it finds as the input bounds for the window run-time position.

 

Description

It can also be used for multiple monitors by adjusting the unbundle function to shows the bounds from the other monitors and the window will resize appropriately

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI.
  2. The front panel adjust the screen resolution

 

Additional Information or References 

VI Snippet 

156.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

David B
Applications Engineer
National Instruments UK

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Kaydon_Rand_Ste
Member
Member
on

Works well - thanks

cirrusio
Active Participant
Active Participant
on

For whatever reason, this entry shows up first when you search for programatically maximizing the front panel.  Why not use the FP.State property to maximize the window?

max_size.png

Here you can also set the monitor to display this on as well as set the FP front most.