Noxious Posted September 1, 2007 Report Share Posted September 1, 2007 I admit I am not very good at using this sites search feature and I apologize if I missed this answer on another thread. I would like to create an application using LabView that executes on startup for Windows and runs an icon in the system tray. I am really unsure where to even begin with this, so any help will be greatly appreciated. Thanks! Quote Link to comment
MikaelH Posted September 1, 2007 Report Share Posted September 1, 2007 Funny you should mention this, because I was just thinking of creating an application like that, and then do the "tray icon" part as a .net Class library. You can then create the "Icon tray" object set its properties/icons and then when a user interacts with the system tray icon the .net part fires call backs to LabVIEW. I've done a similar project before and the callback works great. If I have time to finish the code I'll post it here. //Mikael Quote Link to comment
Mellroth Posted September 1, 2007 Report Share Posted September 1, 2007 QUOTE(Noxious @ Aug 31 2007, 01:18 AM) I would like to create an application using LabView that executes on startup for Windows and runs an icon in the system tray.I am really unsure where to even begin with this, so any help will be greatly appreciated. Hi, you can find information about how to create an NT-Service from your LV application over at NI.com http://zone.ni.com/devzone/cda/tut/p/id/3185 http://digital.ni.com/public.nsf/websearch...9B?OpenDocument I know this only answers part of your question, but I think the system-tray-icon-request has been posted here on LAVA before, I just can't find it. Good luck /J Quote Link to comment
Tomi Maila Posted September 1, 2007 Report Share Posted September 1, 2007 QUOTE(Noxious @ Aug 31 2007, 02:18 AM) I would like to create an application using LabView that executes on startup for Windows and runs an icon in the system tray. Also see this thread on the NI forums: http://forums.ni.com/ni/board/message?board.id=170&message.id=229208' target="_blank">http://forums.ni.com/ni/board/message?boar...ssage.id=229208 Windows services start on windows startup and you can use third party software such as srvany to start your application as a service. Getting your application to a system tray as an icon is a different thing. For this purpose you don't need a windows service but a windows startup program that you set to start from the registry. The system tray interactions are complitely unknown field to me but I guess there is an API for that. You better serarch microsoft documentation rather than LabVIEW documentation as you are pioneering in this field... Tomi Quote Link to comment
Karissap Posted September 1, 2007 Report Share Posted September 1, 2007 See this thread for some discussion about the system tray, there are some commercial LabVIEW libraries around like INVtray and gtoolbox You should be able to do it yourself though with windows dlls or active x. Here is a good tutorial on using srvany.exe to create services. Quote Link to comment
Yair Posted September 1, 2007 Report Share Posted September 1, 2007 In the past I used an ActiveX object NI built using CVI for doing the tray icon thing. The ZIP archive here includes some VIs for interacting with this object. Quote Link to comment
Noxious Posted September 1, 2007 Author Report Share Posted September 1, 2007 Thanks for all the help, this should be very fun to play around with. Quote Link to comment
Michael Aivaliotis Posted September 2, 2007 Report Share Posted September 2, 2007 I've used this with LabVIEW in the past with excellent success: Creating a (system tray) Notify Icon Using .NET Framework 2.0 Quote Link to comment
Yair Posted September 2, 2007 Report Share Posted September 2, 2007 QUOTE(Michael_Aivaliotis @ Sep 1 2007, 09:42 AM) I've used this with LabVIEW in the past with excellent success:http://zone.ni.com/devzone/cda/epd/p/id/3915' target="_blank">Creating a (system tray) Notify Icon Using .NET Framework 2.0 Now I remember why I didn't use this the last time I saw it - it requires .NET callbacks, which aren't supported in LV 7.0. Quote Link to comment
LAVA 1.0 Content Posted September 3, 2007 Report Share Posted September 3, 2007 Now I know for a fact that at some point in time in the past, at at least 7.0, NI themselves released a small package that would allow you to interface with the notifier/system tray. I know this because I downloaded it and it had the NI logo on it and came from an NI person. Now whether this is the CVI one that I have seen on the NI forums I am unsure because I have yet to download it and my backup drive did not show that anything like it was available. And on top of that there was one also released for free at at least the time of 7.0 that came from a 3 letter acronym company like SVT or STV or SFT or ... well heck I can't get it otherwise I would have found it by now. Gotta run for now, but does anyone remember this to prove that the bathroom chemicals did not permanently damage my memory. Quote Link to comment
Yair Posted September 3, 2007 Report Share Posted September 3, 2007 QUOTE(NormKirchner @ Sep 2 2007, 09:10 PM) Now whether this is the CVI one that I have seen on the NI forums I am unsure because I have yet to download it It is the one I linked to earlier from the NI forums. It has a bunch of VIs and a help file. Quote Link to comment
crelf Posted September 4, 2007 Report Share Posted September 4, 2007 QUOTE(NormKirchner @ Sep 3 2007, 04:10 AM) ...does anyone remember this to prove that the bathroom chemicals did not permanently damage my memory. What the hell were you doing in your bathroom that required such strong chemicals?!?! On second thought, forget I asked... Quote Link to comment
Rolf Kalbermatter Posted September 4, 2007 Report Share Posted September 4, 2007 QUOTE(Karissap @ Aug 31 2007, 01:38 AM) You should be able to do it yourself though with windows dlls or active x. Only if you are quite good at C and integrating that through a DLL into LabVIEW. The System Tray API in Windows uses callbacks and integrating that with LabVIEW is not trivial. ActiveX should be easier but I don't think there is a standard Windows ActiveX control that does System Tray. QUOTE(MikaelH @ Aug 30 2007, 08:17 PM) You can then create the "Icon tray" object set its properties/icons and then when a user interacts with the system tray icon the .net part fires call backs to LabVIEW. The .Net System tray API seems to have a problem somehow. I've seen several applications using that and they all seem to not remove the icon from the system tray when the application closes. Apparently there is no way to properly cause such an icon to disappear, especially when the application closed unexpectedly. Rolf Kalbermatter Quote Link to comment
Donald Posted September 6, 2007 Report Share Posted September 6, 2007 Don't forget to put following key in .ini file: runAsService=TRUE This key tells the LabVIEW Run-Time Engine to ignore the Windows WM_ENDSESSION message that is sent when a user logs off! Quote Link to comment
orko Posted September 6, 2007 Report Share Posted September 6, 2007 QUOTE(Donald @ Sep 5 2007, 04:07 AM) Don't forget to put following key in .ini file: runAsService=TRUE This key tells the LabVIEW Run-Time Engine to ignore the Windows WM_ENDSESSION message that is sent when a user logs off! Now THAT is a setting to remember! Thanks for the tip! :thumbup: Quote Link to comment
crelf Posted September 7, 2007 Report Share Posted September 7, 2007 QUOTE(Donald @ Sep 5 2007, 09:07 PM) Don't forget to put following key in .ini file: runAsService=TRUE This key tells the LabVIEW Run-Time Engine to ignore the Windows WM_ENDSESSION message that is sent when a user logs off! That's a good one - can you please add it to http://wiki.lavag.org/LabVIEW_configuration_file.Execution_System' target="_blank">this LabVIEWwiki page? Quote Link to comment
Donald Posted September 11, 2007 Report Share Posted September 11, 2007 QUOTE(crelf @ Sep 6 2007, 04:46 AM) That's a good one - can you please add it to http://wiki.lavag.org/LabVIEW_configuration_file.Execution_System' target="_blank">this LabVIEWwiki page? Ok, done. Quote Link to comment
crelf Posted September 11, 2007 Report Share Posted September 11, 2007 QUOTE(Donald @ Sep 10 2007, 06:10 PM) Ok, done. :thumbup: Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.