03-29-2016 12:40 AM
I have a reentrant vi whose front panel have some fileds need to enter. When I call this reentrant vi 3 times, Labview will open 3 windows, say 1,2,3. Window 1 in most behind, window 2 in the middle and window 3 on the top (most front), same order as the time which vi was called. But I need the opposite way which means windows 3 in most behind, window 2 in the middle and window 1 on the top.
I tried different approach but not work.
1. if I made the vi modal, windows open as 1, 2,3 from behind to top, and have to close them in order of 3,2,1 because everyone is modal, last opened 3 is on the top.
2.if I made the vi floating (hide when Labview is not active) or defult, windows open as 1, 2,3 from behind to top, but I can move/select/close at will, not have to be 3,2,1 like above. It is still not wnat I want.
3. Set the property node "isFrontmost" to false (see attached) still open window 1,2,3, 3 is on the top since it is the last call.
I need a method to move the window to the behind when open the front panel, so 1st call open window 1, 2nd call open window 2 but move it behind window 1,3rd call open window 3 but move it to most behind, so the order of the 3 windows from back to front is 3,2,1.
Any suggestion will be great appreciated !
03-29-2016 02:16 AM
Reverse the list opening the windows.
/Y
03-29-2016 10:12 AM
That is the easiest way I figured too, and it is working for my case here.
Just wandor if there is a way to move window back since write FALSE to "IsFrontmost" can not move the front panel to the back.
Thank you !
03-29-2016 10:24 AM
I remember there being a VI in this package that sets the Z-order of a window using a Windows API call.
http://www.ni.com/example/29935/en/
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-29-2016 10:52 AM
You can call vi method Front panel -> Open, it will put it on top.
03-30-2016 02:04 AM
@BigDrum wrote:That is the easiest way I figured too, and it is working for my case here.
Just wandor if there is a way to move window back since write FALSE to "IsFrontmost" can not move the front panel to the back.
Thank you !
The easiest ways are often the best. 😉
/Y