Creating a Notify Icon Using .NET Framework 2.0
Overview
The Notify Icon VI creates a notify icon in the Windows system tray using the .NET Framework 2.0.
Downloads
Filename: createnotifyicon.zip
Requirements: View
The Notify Icon VI creates a notify icon in the Windows system tray using the .NET Framework 2.0.
The VI uses a Constructor Node to create a NotifyIcon object. The Create Icon subVI creates an Icon property and initializes the object with the icon specified by the Icon configuration controls. The Create Menu subVI creates a Context Menu property and initializes it with menu items. And the Register Callback subVI registers the Event callbacks used for the Icon Click, Show Front Panel Menu Item Click and Default Menu Item Click events.
A While Loop with Event structure handles the Update Icon, Show Balloon and Stop Button Value Change events. Within the events structure, the ShowBalloonTip method shows the text balloon specified by the Balloon configuration controls. The VI also updates the Icon and Text properties for the NotifyIcon object to reflect changes in configuration. Lastly, the VI unregisters Event callbacks, invokes a Dispose method of the NotifyIcon object to remove the notify icon from the system tray and closes the .NET reference.
You can download the .NET Framework 2.0 through Windows Update or directly using the link below.
Requirements
Filename: createnotifyicon.zip
Software Requirements
Application Software: LabVIEW Base Development System 8.2
Language(s): LabVIEW
Reader Comments | Submit a comment »
very nice... thank you
- Aug 5, 2008
unhelpful comments
So it's a "bit" flakey and causes code
bloat... Under what circumstances? How
do you know it wasn't your code? Can
you present a demonstration of the
problems? Thise answers would make
your response meaningful.
- Michael Porter, Data Science Automation. mlportersr@embarqmail.com - Nov 5, 2007
A bit flacky, but very cool
Implemented this into an application for
a drive monitoring program. Caused
HUGE code bloat as well as instability in
the application in LabVIEW 8.2.1. The
callback routine crashes randomly.
Removed and shelved the idea.
- Sep 20, 2007
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
