LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding taskbar icon of exe using runtime - Windows 10

Solved!
Go to solution

I have seen the NI documentation for hiding the exe icon on the task bar

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MbzSAE&l=en-US

 

Ive also seen the comments here on the forum

https://forums.ni.com/t5/LabVIEW/Hiding-taskbar-icon/m-p/18534#M12799

https://forums.ni.com/t5/LabVIEW/Show-Hide-icon-of-my-application-in-the-Window-taskbar-at-run/m-p/3...

https://forums.ni.com/t5/LabVIEW/LabVIEW-exe-icon-in-Window-taskbar/m-p/3741038#M1052937

 

Never the less Im still having troubles getting my EXE to hide on the task bar. Ive created a test application to prove it wasn't something inherently wrong with my project and I have repeatable results.

 

Im setting the ini hideRootWindow=True  and  useTaskBar=False. I call the FP.Open State ''Hidden" (which hides the app as expected)  and I set the FP.Minimizable to False.

Sill I have the Icon on the taskbar.  I want to hide the Icon so my project runs as a background process or service and the user can only close from the Task Manager (in this app, my main project uses the icon tray for access.) When I run the VI in labview it works great, but when I run in the run-time engine the icon shows up on the taskbar.

 

What am I doing wrong?

0 Kudos
Message 1 of 6
(5,111 Views)

This is one of those things that could be difficult to do, because Windows simply doesn't want you to do it. Probably possible (other applications do it), but it might not be easy.

 

If you want it to appear to run as service, you could consider to run it as service.

Message 2 of 6
(5,060 Views)

While I haven't done this often, I do have a relatively recent example (LV 2009, EXE runs on Windows 10) and the only thing I see other than adding the HideRootWindow line to the ini file is adding a delay of 1 second before setting the window to hidden. I don't have a comment there, as this was for a personal project, but I think I added the delay for the same reason. Other than that, my window appearance was left as the default.

 

If that doesn't work, then the suggestion of running as a service is probably your best bet.


___________________
Try to take over the world!
Message 3 of 6
(5,044 Views)

Looks like I may have to run as a service after all.

 

thanks for your input. Ill leave this open for a few more days and see if anyone else has run into this problem.

 

 

thanks!

0 Kudos
Message 4 of 6
(5,023 Views)

There are several techniques to make an exe run as service.

 

I had a great run using task scheduler, shipped with windows. It has many options for respawning, delaying, starting\stopping based on numerous triggers. IIRC, it has both an API and a CL interface, so you can automate stuff. It can do a lot, but simple stuff is doesn't require much experience.

Message 5 of 6
(5,006 Views)
Solution
Accepted by topic author justinthehansen

I discovered that my error was so small I overlooked it altogether.

 

Turns out in the INI file the application name needs to be exactly the same as the application you want that INI to apply to. (duh) Not only here in the example I posted but in my actual application I misspelled the application name in brackets.

 

Icon is hidden from the task bar as expected.

 

thank you to all that looked into this,

Message 6 of 6
(4,983 Views)