LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI opens when it shouldn't

Solved!
Go to solution

Hello,

 

when some VI's in my Project are opened, the Front Panel of another VI (always the same one) also opens. I only want the FP of the VI clicked on in the Project.

Anyone knows why this is and what can be done against it?

0 Kudos
Message 1 of 11
(2,908 Views)
Solution
Accepted by topic author matys

Open the VI Properties of the VI that keeps opening and check its Window Appearance tab. I'll bet the Show front panel when loaded option is checked.

 

Customize Window Appearance.png

 

Also check the VI node in the caller. You can right-click the subVI node and select SubVI Node Setup... and see the following dialog:

 

SubVI Node Setup.png

 

Check for it there too. This is less likely since most people don't even know these options exist.

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
Message 2 of 11
(2,895 Views)

My guess is that the vi is set to Show Front Panel when Loaded, but that's only a wild guess since you've not shared any of your code.

 

Edit: Looks like rwunderl beat me to it.

Message 3 of 11
(2,894 Views)

yep, that did it. thanks to both of you!

0 Kudos
Message 4 of 11
(2,884 Views)

Don't take those settings lightly!  They were set that way for a very specific reason.  Usually, it is because it is some kind of dialog VI that needs to be shown to the user.  Don't arbitrarily disable those settings.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 11
(2,801 Views)

@billko wrote:

Don't take those settings lightly!  They were set that way for a very specific reason.  Usually, it is because it is some kind of dialog VI that needs to be shown to the user.  Don't arbitrarily disable those settings.


I agree that these settings that other developers have made should not be taken lightly. However, I disagree that "some dialog" that needs to be shown should be set to Open front panel when loaded. That sounds like a bad application architecture to me. Granted, I do not know why @matys's application includes a VI that shows itself (and is apparently not the top-level VI), but that in and of itself sounds like a bad application architecture.

 

I believe that Open front panel when loaded should be reserved for top-level VI's only. Period. Even then, you may wish to control when the VI shows its own front panel programmatically to avoid the user ever seeing initialization actions or the VI's destruction as the application closes (especially when compiled into an exe, as seeing the VI going idle before disappearing gives a pretty nasty user experience IMHO).

 

My advice to @matys is to review the application's structure and have at most 1 VI be set to Open front panel when loaded: the top-level VI.

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
0 Kudos
Message 6 of 11
(2,746 Views)

@rwunderl wrote:

@billko wrote:

Don't take those settings lightly!  They were set that way for a very specific reason.  Usually, it is because it is some kind of dialog VI that needs to be shown to the user.  Don't arbitrarily disable those settings.


I agree that these settings that other developers have made should not be taken lightly. However, I disagree that "some dialog" that needs to be shown should be set to Open front panel when loaded. That sounds like a bad application architecture to me. Granted, I do not know why @matys's application includes a VI that shows itself (and is apparently not the top-level VI), but that in and of itself sounds like a bad application architecture.

 

I believe that Open front panel when loaded should be reserved for top-level VI's only. Period. Even then, you may wish to control when the VI shows its own front panel programmatically to avoid the user ever seeing initialization actions or the VI's destruction as the application closes (especially when compiled into an exe, as seeing the VI going idle before disappearing gives a pretty nasty user experience IMHO).

 

My advice to @matys is to review the application's structure and have at most 1 VI be set to Open front panel when loaded: the top-level VI.


I have to disagree about not showing the front panel of a subVI.  This is common, accepted practice.  How would you show a timer, for instance?  What about a password box, or other custom dialog?  I have a pop-up box that performs an auto-cal and gives the user a chance to cancel.  How would I accomplish this?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 11
(2,742 Views)

@billko wrote:

@rwunderl wrote:

@billko wrote:

Don't take those settings lightly!  They were set that way for a very specific reason.  Usually, it is because it is some kind of dialog VI that needs to be shown to the user.  Don't arbitrarily disable those settings.


I agree that these settings that other developers have made should not be taken lightly. However, I disagree that "some dialog" that needs to be shown should be set to Open front panel when loaded. That sounds like a bad application architecture to me. Granted, I do not know why @matys's application includes a VI that shows itself (and is apparently not the top-level VI), but that in and of itself sounds like a bad application architecture.

 

I believe that Open front panel when loaded should be reserved for top-level VI's only. Period. Even then, you may wish to control when the VI shows its own front panel programmatically to avoid the user ever seeing initialization actions or the VI's destruction as the application closes (especially when compiled into an exe, as seeing the VI going idle before disappearing gives a pretty nasty user experience IMHO).

 

My advice to @matys is to review the application's structure and have at most 1 VI be set to Open front panel when loaded: the top-level VI.


I have to disagree about not showing the front panel of a subVI.  This is common, accepted practice.  How would you show a timer, for instance?  What about a password box, or other custom dialog?  I have a pop-up box that performs an auto-cal and gives the user a chance to cancel.  How would I accomplish this?


I often use show front panel when called (and Close after if originally closed), but I don't think that I've every intentionally set a sub-vi to open the front panel when loaded. I'm sure that there are applications where this is useful, but I've not ran into one. I do agree with you in principle that one should not lightly change those settings without understanding the possible ramifications.

0 Kudos
Message 8 of 11
(2,733 Views)

@billko, I think you misread my post. I am not saying I never automatically show a subVI's front panel. I'm saying I would NEVER set a subVI to have its front panel open when LOADED into memory. That makes no sense at all except for the top-level VI. Even worse is a VI in a class or library that shows when loaded. Because classes/libraries are loaded into memory with the project, they would pop up when you open the project. That's no fun.

 

I agree with @johntrich1971 that I often use Show front panel when called and Close afterwards if originally closed. These are extremely common, and yes, that's the way you would typically show any dialog window.

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
Message 9 of 11
(2,722 Views)

@rwunderl wrote:

@billko, I think you misread my post. I am not saying I never automatically show a subVI's front panel. I'm saying I would NEVER set a subVI to have its front panel open when LOADED into memory. That makes no sense at all except for the top-level VI. Even worse is a VI in a class or library that shows when loaded. Because classes/libraries are loaded into memory with the project, they would pop up when you open the project. That's no fun.

 

I agree with @johntrich1971 that I often use Show front panel when called and Close afterwards if originally closed. These are extremely common, and yes, that's the way you would typically show any dialog window.


Sorry, I think I need to take some remedial reading for context classes!  Thank you for patiently re-explaining things for my benefit.  I do agree then, after all.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 11
(2,713 Views)