Jump to content

Hide Front Panel of a Startup VI


Recommended Posts

Good Afternoon (Morning for the west coasters), I'm having a bit of difficulty getting an executable of mine built in labview to behave the way I would like it to. Basically I have a simple VI which uses the command prompt to map a few drives on our network. I built this VI into an executable with hopes of tossing it into the startup folder of our machines here at work to auto-map all the drives that we need (using exe over a .bat to help keep login and passwords to remote drives more secure). The application works, however I'd like it to be of no interference to my users, as though nothing new has happened/changed so that I don't get 1000 questions asking me what the new window that pops up is for. I haven't had much luck getting the UI/Front Panel to show up however. I know that I can set FP.Open to false and it will go away, however it still flashes momentarily on the screen. If anyone has any idea's or suggestions I would appreciate it.

Thanks,

Dave Graybeal

Link to comment
Deactivate all options in VI properties.Window Appearance (Title bar, Menu bar,etc...) and use Close FP method on start of your VI.

Thank you very much, this worked exactly how I was hoping it could. I am a little curious why the method takes precident before the front panel is actually loaded vs the property node fp.open causing it to open for a brief second.

Thanks for the help,

Dave Graybeal

Link to comment
Deactivate all options in VI properties.Window Appearance (Title bar, Menu bar,etc...) and use Close FP method on start of your VI.

Because it is asynchronous. The execution of the property Node does only post an event to the UI thread to refresh that VI front panel next time it gets around to be scheduled by the OS to execute. It then continues to execute the diagram and changes the other property nodes too. At some point the OS decides that the current thread has had enough of a time slice, interrupts it and eventually passes control to the UI thread which then does proceed to do whatever it needs to do according to the current properties for that window.

This can mean that you still might see flicker on a very slow machine. Nothing to do about this.

Rolf Kalbermatter

Link to comment

I was a bit surprised to see this reply because I have always thought LabVIEW executables would terminate immediately if they do not have any front panels open...and when I tried this just now that still seems to be the case, however I am using LV 7.1.1 here so perhaps this works in LV8 or there is some detail I have overlooked?

I deactivated all options in the window appearance option window and the first thing I run is the VI close method, and voila - the application does no longer run.

Regards,

Mads

Deactivate all options in VI properties.Window Appearance (Title bar, Menu bar,etc...) and use Close FP method on start of your VI.
Link to comment
I was a bit surprised to see this reply because I have always thought LabVIEW executables would terminate immediately if they do not have any front panels open...and when I tried this just now that still seems to be the case, however I am using LV 7.1.1 here so perhaps this works in LV8 or there is some detail I have overlooked?

I deactivated all options in the window appearance option window and the first thing I run is the VI close method, and voila - the application does no longer run.

Regards,

Mads

I use to think so. But It seems it depends on which kind of code is on your BD. I will try to synthesize this and post some example when i have time.

I suppose it is due to thread switching as Rolf said.

Link to comment

Well, apparently I jumped the gun a little bit. Yesterday after placing in the closeFP property node I noticed that the lack of front panel appeared exactly as I was hoping ( no blinking screen before it disappeared). However, I failed to look at the results of the code which ended up not executing. It apparently is the case that EITHER the CloseFP method or the FP.Open Property used to hide the front panel will causes labview to immediatly stop execution. So I'm pretty much back to where I started now, looking for a way to run my executable in a state that hides my front panel without using the CloseFP method or FP.Open Property. I believe I've seen Apps written in LabVIEW that have been able to launch in he system Tray of the Computer without having any active visible Front Panels. If anyone has any further insite on this I would appreciate it.

Thanks again,

Dave Graybeal

Alright, after playing with a few more things I managed to find a property node that appears to work for hiding the Front Panel of the VI in an executable. First thing I do is Set the Run VI Transparently to True, then I set the Transparency Level to 100% which makes the VI invisible. Now when I launch the VI all I see is a Windows Task Bar for the VI come up, No Front Panel Flash or anything. Thanks to all for the help!

Dave Graybeal

Link to comment
Alright, after playing with a few more things I managed to find a property node that appears to work for hiding the Front Panel of the VI in an executable. First thing I do is Set the Run VI Transparently to True, then I set the Transparency Level to 100% which makes the VI invisible. Now when I launch the VI all I see is a Windows Task Bar for the VI come up, No Front Panel Flash or anything. Thanks to all for the help!

Great idea !

Link to comment
Thanks again,

Dave Graybeal

Alright, after playing with a few more things I managed to find a property node that appears to work for hiding the Front Panel of the VI in an executable. First thing I do is Set the Run VI Transparently to True, then I set the Transparency Level to 100% which makes the VI invisible. Now when I launch the VI all I see is a Windows Task Bar for the VI come up, No Front Panel Flash or anything. Thanks to all for the help!

Dave Graybeal

You might try opening the front panel with its coords of the window set to off the monitor screen as well.. Running the VI transparently might be a pain to debug.

Neville.

Link to comment

I found here an information about how LabVIEW handle the panel and the VI in memory but I'm not sure it was true for every version.

To sum up, they suggest that the VI must open a self reference in such way LabVIEW keep it memory.

So I made some tests in different versions of LV : 6.1, 7.1.1, 8.0.1 (see Attachment).

The code of VI is simple and it is the same for all version (Open Self VI Reference - CloseFP - write date & time in a text file - Close VI Reference). I'm build exe for every version and use it for results.

Test machine :

PC WinXP sp2

CPU : P4-2.6GHz

RAM : 1.5Gb

Results :

  • LV61 : always works
  • LV711 : randomly works
  • LV801 : doesn't work

It's difficult to me to explain this difference. Someone has an idea ?

Rolf, you seem to understand threading rules in LabVIEW, maybe it's obvious for you.

Download File:post-1057-1153985925.zip

Link to comment
I found here an information about how LabVIEW handle the panel and the VI in memory but I'm not sure it was true for every version.

To sum up, they suggest that the VI must open a self reference in such way LabVIEW keep it memory.

So I made some tests in different versions of LV : 6.1, 7.1.1, 8.0.1 (see Attachment).

The code of VI is simple and it is the same for all version (Open Self VI Reference - CloseFP - write date & time in a text file - Close VI Reference). I'm build exe for every version and use it for results.

Test machine :

PC WinXP sp2

CPU : P4-2.6GHz

RAM : 1.5Gb

Results :

  • LV61 : always works
  • LV711 : randomly works
  • LV801 : doesn't work

It's difficult to me to explain this difference. Someone has an idea ?

Rolf, you seem to understand threading rules in LabVIEW, maybe it's obvious for you.

Download File:post-1057-1153985925.zip

Hello!

I think i've found a solution by using "FP.State=Hidden" instead of "FP.Open".

I only tested it with LV7.1! (afaik LV6.x does not have this Property)

Download File:post-1390-1153998177.zip

Link to comment
Hello!

I think i've found a solution by using "FP.State=Hidden" instead of "FP.Open".

I only tested it with LV7.1! (afaik LV6.x does not have this Property)

Indeed, it works well! It seems to be the best solution.

Moreover with adding the lines below in application INI file (WriteTimeToFile_LV711.ini), it will hide window in Task Bar.

[WriteTimeToFile_LV711]

HideRootWindow = TRUE

Walx a question : what is the "WriteTimeToFile_LV711.bat" file in your build directory?

Link to comment

Perfect My Drive Mapper now show's no indication that it ran. Hiding the Task Bar was a great idea. I have now evaded 1000 questions about why my users computer screen blinks or pops up new software. Thanks to Everyone for the Help!!!

The Following is a screenshot of the simple program used to map my drives for my users. I build this VI into an executable and place a shortcut to the executable in the Windows Startup folder so my users have all the drives mapped. I also added in the HideRootWindow = True into the ini File so there is no indication that this drive map program is running.

post-4149-1154003576.jpg?width=400

Dave Graybeal

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.