LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change appearance of the inactive VI's windows

Solved!
Go to solution

Hello!

 

I'm working on a software which calls different sub-VIs and they all open as new windows in front of the main one. The problem is that those windows are usually smaller than the parent VI and sometimes the amount of controls you see on the screen is a little annoying. You would see the parent VI on the area which the new window doesn't covers. What I would like to do is to have the parent VI change it's brightness or maybe have some "fog effect" on it in such a way that what calls your attention is the currently active VI. Please apologize for the confusing explanation, but I'm not sure how to make myself "understandable". I found an article explaining how to change the background color of the VI, however, I have an image as the background of the application, so the color change would have no effect. What I want is something similar to what happens when Windows Vista asks you for administrative rights to proceed with some action, when all the remaining screen gets darker and that brings your attention to the dialog box.

 

Thanks in advance for the help!

 

Regards,

 

Giovanni

0 Kudos
Message 1 of 7
(3,898 Views)

You can use the Front Panel Window - Transparency property node to set the transparencies of the windows not in focus to a more transparent value.

- tbob

Inventor of the WORM Global
Message 2 of 7
(3,886 Views)

See the attached VI.

Tim
GHSP
Message 3 of 7
(3,878 Views)

Here's one I did a long time ago, but never actually used. A quick test in LV 2009 shows it doesn't show the fading in and out effect it was supposed to, but I'll let you figure that one out in the code if you want. As the others mentioned, you can now probably replace the transparency subVIs with the built-in property.


___________________
Try to take over the world!
Message 4 of 7
(3,852 Views)

Together with using the transparancy control of the main VI, if you make the "Window appearance" property of sub-VI as "Modal", it will always stay on top of the caller VI. See examples attached.

Message 5 of 7
(3,845 Views)
Solution
Accepted by topic author PaceG

Hello!

 

First of all, thanks a lot for your prompt assistance. Unfortunately, I'm running LabVIEW 7, so I could not find the built-in transparence function. I've checked tst's library and used his transparence sub-VI on the inactive window whenever a new window is opened.

 

I did some changes to it adding comments from my researches on MSDN regarding the functions used, so in case anyone finds it helpul, here's the VI.

 

I appreciate everyone's contribution.

 

Giovanni Pace

Message 6 of 7
(3,819 Views)

The transparency property works perfectly fine in Windows 7. It can be found at VI.Front Panel Window>>Transparency, but you should note there's another boolean property there which you need to set to T if you want it to actually work. Also, its scale is 100-0 as opposed to the 0-255 you currently have. I would say it's better to use it because it's built in and should work on all platforms.

 

I can say that the Windows function has one nice advantage in that you can use it to set one color in a window completely transparent, thus creating a hole in the window (which you can click through to what's under the window. This allows creating shaped windows fairly easily.

 

Also, that demo was written as a test. As you can see it's messy and it has code which was placed there to work around display issues in older LV versions. If you're going to use it, I would suggest cleaning and debugging it (and then maybe uploading the updated code).


___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(3,804 Views)