Qia's LabVIEW Station Virry Test & Control

We talk about LabVIEW and HVAC

How Can I Minimize a VI to an Icon on the Windows System Tray?

Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 7.1
Primary Software Fixed Version: N/A
Secondary Software: N/A


Problem: Is it possible to minimize a VI to an icon on the Windows system tray instead of the on the Windows task bar? If so, how do I do this?

Solution: Yes it is possible. To achieve this you will have to use the function shell_notifyicon() from shell32.dll, which is found in the Windows directory of your system.
To do this you will have to make a MFC dll which can load a custom icon file and also give access to certain functions necessary.
The shell_notifyicon() function accepts 5 inputs. You will predominantly need window handle and icon handle.
You can get icon handle for a icon file by using the LoadIcon() function.
You can get the Windows handle from "Window Get Refnum.vi" which is a VI found in the example program linked below.

For more help on Shell_noitfyicon(), refer to MSDN library or the Microsoft support web site.

Related Links: Developer Zone Example: Windows API Function Utilities (32-bit) for LabVIEW

posted on 2005-07-24 14:25  LabVIEW开发者  阅读(609)  评论(0编辑  收藏  举报

导航