06-17-2009 07:08 AM
Hi,
I'm launching a LabVIEW application from a script in cygwin. I don't want the application to be shown to the user and neither lose the windows focus of the active windows when the application is lauched. How can this be done?
Thanks,
Michel
06-17-2009 07:29 AM
Have a look at the following:
http://forums.ni.com/ni/board/message?board.id=170&message.id=387770&requireLogin=False
06-23-2009 07:03 AM
Hi Adnan,
I already had the code you are refering in your response. The thing is that the cygwin script is making multiple calls to my LabVIEW application. So if the user is working on something else during these calls he is loosing the focus of the window is working on. Is there a way to avoid that?
Thanks,
Michel
06-24-2009 12:58 PM
Michel-
Is your code calling SubVIs? If this is the case, you will need to include the code referenced on the forum above in each SubVI. This is due to the fact that your script will execute these other VIs and they will not run hidden.
If this is not the case, can you post your code for us to take a look at? Perhaps there is something in your code requiring it to be in view.
-Mike S
06-25-2009 07:14 AM
Hi,
Here is a very simple application, this is the smallest application you can have to do what I want. If you compile this VI into an executable and add the HideRootWindow=True and you run it on your computer you will always see the root windows in the task bar for a fraction of second and then it disappears.
So let say I'm working in microsoft word and my cygwin script is running in the background, I'm loosing the microsoft word application focus when the cygwin script is calling the labview executable. I want to get rid of that behavior.
Answers to your previous questions:
1. Yes I'm calling subVIs but not as user interface.
2. The cygwin script is launching a labview executable.
3. Nothing is requiring to be in view as shown in the attached example.
Thanks for your help,
Michel
06-25-2009 09:06 AM
06-25-2009 09:47 AM
Doesn't work either. This time I had the windows explorer window opened in the LabVIEW executable folder. I've double clicked on the executable and I losed the focus on the windows explorer window.
Michel
06-25-2009 10:23 AM
06-25-2009 10:26 AM
I'll have to wait until the cygwin guru come back from vacation and I will ask him if he can call a dll.
Thanks for the help.
Michel