LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse Events at the icon in systray.

Highlighted
My program call library function to add, modify or delete icon into systray.
Additionaly I'd like to get back information when any mouse event had happen under icon in systray like move mouse, right/left button click etc. to display popup menu (as an standart behaviour).
I've tried Windows Message Queue, but it only works inside application window area.
How could I do it ?
Any suggestions, examples or advises ?
Rumcajs.
0 Kudos
Message 1 of 22
(16,160 Views)
And its important: Labview 6.0.2 under Win XP.
Rumcajs.
0 Kudos
Message 2 of 22
(16,146 Views)
Hi Rumcajs,

I would suggest using the Windows Shell_NotifyIcon event rather than the Message Queue to handle system tray events. You can define your own callback function using this function call with the NOTIFYICONDATA structure and the uCallbackMessage parameter. Also, there is example code on The Code Project: Basic use of Shell_NotifyIcon in Win32.

Hope this helps!
0 Kudos
Message 3 of 22
(16,146 Views)
I've tried to do it. But it seems like LV6.0 doesn't operate direct on Windows events except for LV6.1 or higher. I've properly defined NOTIFYICONDATA structure including uCallbackMessage parameter, but how to get back information to LV that event had happen ?
Maybe a small example ?
Rumcajs.
0 Kudos
Message 4 of 22
(16,148 Views)
Hi Rumcajs,

Here's another option: LabWindows/CVI provides an easy way to create system tray icons and process those events. I have a sample LabVIEW program that leverages off CVI as an ActiveX Server. Try out the attached program and let me know if you have any questions.

Thanks!
Kileen
Message 5 of 22
(16,148 Views)
Thanx a lot, but.....
I cannot use vi added to user library after ActiveX Server installation because of their version incompatibility. I've got LV 6.0 not 7.0. Even though I've tried to use your ActiveXServer's property and methods to create systray icon with succesfull (the vi in atttachment - Test.zip). However there is no method or property to check which menu item was selected, and the quality of icon in systray is not good.
I've attached my own program (MySystrayIcon.zip) to show how this icon should looks like.
Would you add any method or property to your ActiveX to check selected menu item ?
Regards.
Rumcajs
0 Kudos
Message 6 of 22
(16,148 Views)
Hi Rumcajs,

I've attached a LabVIEW Tray Example.html document that contains all the documentation (block diagram included) for the VI. There is a Get Menu Item method that I think you will want to use. Hopefully this documentation will help you view the VI. The top-level VI as well as all subVIs are included in the documentation.
0 Kudos
Message 7 of 22
(16,148 Views)
Hi !
Thanks for your commitment. Altrough I've to do it by more indirect way (using Active X and LV Events for Active X) - you know I've got only LV6.0.2.
Regards.
Rumcajs.
0 Kudos
Message 8 of 22
(16,148 Views)
Hi,

I have downloades the 5 MB Version of this ActiveX component.

It works fine... for some time. But now I have a problem:

I run the example ones... all is fine I can chose the icon I like.
But if I run the example a second time LabView "hangs". Nothing happens and I have to kill LabView with the taskmanager. I use a WindowsNT 4.0 and LabView 7.1

The hole thing works some days before. I have used the ActiveX component in my own application. All the troubble beguns as I tryed to change the ICON while running my program. Changeing the icon works for one time I run the VI. But if I run the VI a second time there a two differend errors:
first: nothing happens and I have to kill LabView
second: the menu on the icon is "growing". The 3 elements (About, Show, Exit) will be added to the menu.. so I have all the elements multiple in the menu.

I hope you can help me.
(sorry for my english: german speeking)

Message Edited by Lord-Overon on 03-07-2005 02:03 AM

0 Kudos
Message 9 of 22
(16,024 Views)
 

 

Requirements    Price: $29.95

 

 Application Software:

LabVIEW 7.0+

 Toolkits Software:

 

 Additional Software:

 

 Language's:

LabVIEW


INVtray LabVIEW Toolkit allows the programmer to create a LabVIEW program that can be hidden from the task bar and accessed through the System Tray.  Comes with a sample VI that demonstrates all the features of the toolkit.
         
 
 
 

 
 
 
0 Kudos
Message 10 of 22
(15,667 Views)