Example Code

How to make a VI invisible when the user minimizes it, for LabVIEW

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

Description

1. Overview
This example shows how to make a VI invisible and off the taskbar when the user minimizes it.

 

2. Description

Using an event structure, we monitor for the Panel Resize event which is fired when the user changes the size of the panel in any way, including minimization. Then, using property nodes we control the transparency of the VI. We also modify the "Minimizable" property in order to remove the VI from the taskbar. A timeout event makes the VI visible again so the user can stop it.

If the user minimized the window, we return it to the Standard size using a property node. Then we use two properties to make the VI invisible: Run Transparently and Transparency. The first allows for the VI to have a transparency, while the second sets the level of transparency. When set to true and 100, respectively, they make the window invisible. Finally, we use the Minimizable property to remove the VI from the taskbar (false = not in the taskbar).

 

3. Requirements

  • NI LabVIEW Base Development System 2012 or compatible.

 

4. Steps to Implement or Execute Code

  1. Download the VI.
  2. Run the VI.
  3. Minimize the window to make it invisible and off the taskbar.
  4. Wait for the time out event to make the VI visible again.
  5. Press the stop button when done.

 

5. Additional Information or References

 

Make a VI invisible when minimized Screenshot.PNG

 

**The code for this example has been edited to meet the new Community Example Style Guidelines.**

Jared S.
Applications Engineering
National Instruments

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

Comments
pRoFiT
Member
Member
on

Why does the vi disapear from the taskbar when going invisible? I thought the transparency only effected the front panel? also is there an easy way to make a tray icon for the vi when it is 100% transparent? So you could add menu control to a tray icon and reopen the vi.

I found an example once for tray icons but the code was buggy and caused the application to crash. I was hoping a tray icon vi would be built into labview Maybe i will suggest it at www.ni.com/ideas

- A minute saved is a Minute earned!