06-25-2013 09:52 PM
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!
06-26-2013 07:08 AM
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
06-26-2013 09:30 AM
If your interacting vi is not under development, you may consider building an exe from it.
06-27-2013 08:56 PM - edited 06-27-2013 09:09 PM
@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.
06-28-2013 02:21 AM
@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
07-16-2013 12:18 AM - edited 07-16-2013 12:20 AM
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:
@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.
07-16-2013 11:51 AM
@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.
09-05-2013 10:02 AM
There's an Idea in the Exchange to correct this behavior. Please Kudo if you'd like to see this changed:
09-05-2013 10:13 AM
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
09-05-2013 10:22 PM - edited 09-05-2013 10:26 PM
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 😄