LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop LabVIEW from bringing ALL windows to the front?

Hello,

 

I often need to monitor my CompactRIO system on the DSM, and interact with the system via a Front Panel. I'd like to be able to Alt+Tab between the DSM and the Front Panel without moving all the other windows.

 

How can I make LabVIEW bring ONLY one window to the front and leave the others where they are? Even if I close all other VIs and the block diagram, the Project Explorer still comes along for the ride.

 

 

Thanks!

Certified LabVIEW Developer
Message 1 of 10
(6,682 Views)

As LV is a single process for the OS, the OS brings any window of the process to front if that process gets the focus.

 

Have you tried working with minimized project explorer? It shouldn't "pop up" if you switch processes OS-wise.

 

That btw is a situation where i would want to have two monitors 😉

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 10
(6,650 Views)

If your interacting vi is not under development, you may consider building an exe from it.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 10
(6,626 Views)

@Norbert_B wrote:

As LV is a single process for the OS, the OS brings any window of the process to front if that process gets the focus.


Hi Norbert,

 

That's inaccurate. For non-LabVIEW multi-window programs, Alt+Tabbing into one window leaves the others untouched, despite belonging to the same process. Multi-window programs (including LabVIEW) have one entry under the Task Manager's "Processes" tab, but one-entry-per-window under the "Applications" tab -- the OS manages each window independently from the others.

 

LabVIEW programmatically manages its windows (e.g. closing a front panel will also close the associated block diagram), so I hypothesize that it programmatically brings all its windows to the front when one of them receives focus. Is there a switch to disable this behaviour? No other application does this, as far as I can tell.

 


Norbert_B wrote:

Have you tried working with minimized project explorer? It shouldn't "pop up" if you switch processes OS-wise.


Yes, that works 🙂 Only for simple cases though; this workflow doesn't scale to scenarios when I want to interact with multiple front panels and/or block diagrams.

 


Norbert_B wrote:

That btw is a situation where i would want to have two monitors 😉


Not all of us have that luxury 😄 Anyway, I do have 2 monitors, but my workspace is usually more complex than the example in my original post. Quite often, I'd be testing my software with these windows open: Note-taking software, a few front panels (to monitor controls/indicators), maybe a block diagram (for probing), the probe window, and DSM (for monitoring/manipulating network variables and CPU/RAM usage).

 

Not looking at ALL windows simultaneously of course, but minimizing+restoring windows on the go is slow. Pressing Alt+Tab+Tab+Tab+Tab+Tab frequently -- which is required when LabVIEW modifies the window Z-order -- is slow too.

 

Do seasoned LabVIEW developers have any workflow tips to share, when working on large applications? How do you handle multiple LabVIEW windows -- do you just get used to the window behaviour, or do you use some tricks?

 


@pincpanter wrote:

If your interacting vi is not under development, you may consider building an exe from it.


Thanks for your suggestion, Paolo. However, I'd like to change LabVIEW's window-handling behaviour to make development more pleasant.

Certified LabVIEW Developer
0 Kudos
Message 4 of 10
(6,581 Views)

@JKSH wrote:

@Norbert_B wrote:

As LV is a single process for the OS, the OS brings any window of the process to front if that process gets the focus.


Hi Norbert,

 

That's inaccurate. [..]. Multi-window programs (including LabVIEW) have one entry under the Task Manager's "Processes" tab, but one-entry-per-window under the "Applications" tab -- the OS manages each window independently from the others.[...]


Hehehe,

 

The point is, that in my experience you can only handle each window independently at swapping tasks if there are multiple processes in the Task Manager. For instance Internet Explorer with multiple windows also spawns multiple processes.

LV does not.

 

I know that there are options for the vendor of an application to select which way the application later should behave, but sadly, this is a static setting when compiling the executable. Afaik, you cannot change that once the EXE was built.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 10
(6,564 Views)

Whoops, I forgot to reply to this, sorry. Thank you for your replies 🙂


@Norbert_B wrote:

The point is, that in my experience you can only handle each window independently at swapping tasks if there are multiple processes in the Task Manager. For instance Internet Explorer with multiple windows also spawns multiple processes.

LV does not.


As I said before, multiple processes are definitely not required to handle multiple windows independently. I wrote a simple program in Qt that launches multiple windows; Alt-Tabbing into that brings only the selected window to the front and leaves the others behind.

 

As you can see, it's a mono-process, multi-window program, just like LabVIEW:

 

multiwindow.png 


@Norbert_B wrote:

I know that there are options for the vendor of an application to select which way the application later should behave, but sadly, this is a static setting when compiling the executable. Afaik, you cannot change that once the EXE was built.

Norbert


I hadn't heard of that before, so I went digging. I couldn't find anything about the static setting you mentioned, but I found this Microsoft function which is designed to let programs bring individual windows to the foreground at runtime.

 

So, I highly doubt that LabVIEW's behaviour is due to a compile-time setting.

Certified LabVIEW Developer
0 Kudos
Message 6 of 10
(6,515 Views)

@JKSH wrote:

How can I make LabVIEW bring ONLY one window to the front and leave the others where they are?


You can't, not because of some setting that NI set when building LV, but because LV has explicit code which does the windows management and that's what's causing this.

 

That doesn't mean that this can't be changed in principle (see this and there are a number of ideas in the IE relating to window management), but it would have to be an explicit change made by NI, and I'm not sure that's an area of the code anyone would be to glad to jump into. I'm guessing it has some complications having to do with supporting the same type of management on different platforms.


___________________
Try to take over the world!
0 Kudos
Message 7 of 10
(6,494 Views)

There's an Idea in the Exchange to correct this behavior.  Please Kudo if you'd like to see this changed:

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Don-t-force-all-LabVIEW-windows-to-the-top-when-one-is...

Message 8 of 10
(6,394 Views)

As I also commented in the Idea Exchange, this is an OS issue at least in part. On the Mac a click on a partially hidden LV window brings only that window to the front.

 

Lynn

0 Kudos
Message 9 of 10
(6,383 Views)

Thank you, fairlyFunctional! I hope your idea gains lots of traction and attracts NI's attention, so that they'll do something about it.

 

I thought NI simply didn't want to risk breaking the existing window management system, which is understandable. But from AristosQueue's comments, it looks like NI was unaware that this change is even possible. There's a glimmer of hope now 😄

Certified LabVIEW Developer
Message 10 of 10
(6,359 Views)