LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the front-panel to pop to the front of the screen?

I have a program that is reading in some network files. When a certain part of the file has been changed I want to pop up the front panel and blink the changed area. The blinking is easy and I can get the VI to pop to the front of any other running LV stuff (using the IsFrontmost vi property) but I need the vi to pop to the front of the entire screen and whatever else is running (Excel or the such). Any ideas on this? I'm doing the development on LV 6.1 on Win2k.

Thanks,
Gary
0 Kudos
Message 1 of 17
(3,567 Views)
Hello Gary,

There is a whole set pf Vi's called Windows Interaction Vi's which will let you do what you want. It uses native Windows API calls to accomplish this.

Here is a Link where you can get them

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/2986fc3ae5cc1e3c86256c3f006ee656?OpenDocument

Good Luck

Mache
Good Luck!

Mache
0 Kudos
Message 2 of 17
(3,547 Views)
You can use NI's lvwutil32.zip to set your front panel to topmost.

lvwutil32.zip is free, and you can download it from NI site, just do a search.


George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 3 of 17
(3,547 Views)
Thank you both. These look exactly like what I needed. Thanks.
0 Kudos
Message 4 of 17
(3,543 Views)
Well I added those libraries and placed the move to top vi into my program. Thing is, it doesn't move the window to the top. I checked the window name to make sure I was using the same string and I am. The LabVIEW taskbar button blinks but the window I'm trying to bring up neither blinks nor pops up. Is there some sort of limitation to using this with the front panel? Am I missing something else?

Gary
0 Kudos
Message 5 of 17
(3,539 Views)
Anyone have any clues as to what may be the issue here?
0 Kudos
Message 6 of 17
(3,515 Views)
Hi Gary,

There is one thing I think you may have to do. If the window is minimized than it will try to make it topmost but the minimize will take precedence, so you will see the task bar blink and the OS stays in the active/current window. Try to use the "restore window" vi before trying to make it topmost. That should work.

Also make sure that, the LV window you are trying to restore and make topmost is not superceded by another LV modal window.

Thats my take, Let me know if that works, for future reference.

Good Luck
Mache
Good Luck!

Mache
0 Kudos
Message 7 of 17
(3,510 Views)


@Mache wrote:
Hi Gary,

There is one thing I think you may have to do. If the window is minimized than it will try to make it topmost but the minimize will take precedence, so you will see the task bar blink and the OS stays in the active/current window. Try to use the "restore window" vi before trying to make it topmost. That should work.

Also make sure that, the LV window you are trying to restore and make topmost is not superceded by another LV modal window.

Thats my take, Let me know if that works, for future reference.

Good Luck
Mache




I've tried putting in the Restore Windoe vi and the results are the same. Both of those functions (seperate or together) result in the window moving to the top of the other LV screens only. If I have Word or explorer or anything else open, that window will stay on top and the task bar flashes. Can I use the "move window to front" vi in my main vi to move my main vi's front panel to the front? If not are there any ways to get around this? My program is mostly running in the background but when there's an important change I need it to move to the front and take precedence for a few seconds.
0 Kudos
Message 8 of 17
(3,508 Views)
Instead of using "Bring Window to Top" Try using "Make Window TopMost" After your Work is done you will have to do "Revoke Window Topmost"

I a m attaching a small Example. The temp.vi waits 10 seconds after it is run and then attempts to make it topmost. In the 10 seconds I go to excel and maximize it. My vi comes up as desired. In fact it stays on top n o matter what. The only way to revoke the topmost property is to close it or do it programmatically.

I hope this helps..

Mache
Good Luck!

Mache
Message 9 of 17
(3,504 Views)


@Mache wrote:
Instead of using "Bring Window to Top" Try using "Make Window TopMost" After your Work is done you will have to do "Revoke Window Topmost"

I a m attaching a small Example. The temp.vi waits 10 seconds after it is run and then attempts to make it topmost. In the 10 seconds I go to excel and maximize it. My vi comes up as desired. In fact it stays on top n o matter what. The only way to revoke the topmost property is to close it or do it programmatically.

I hope this helps..

Mache




That way works good enough for me. I simply pop it up, display my info for a few seconds and then minimize it. Thanks a bunch.

Gary
0 Kudos
Message 10 of 17
(3,492 Views)