LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Floating windows

I have an application that consists of a main application vi that by use of a state machine opens a series of sub vis (one at a time) to allow user input and application control.

 

The main vi has it appearance set to default - it fills the screen and displays title/logo/issue.

 

The sub vis are floating vis set to show panel when called and close afterwards if originally closed.

 

Some subvis are run by key press and some are run in sequence programmatically.

 

The problem is that if an 'other' application (eg outlook) is given focus and then a subvi is opened programatically the main vi stays in the background, the subvi is in the foreground and the 'other' application sits in between the two. Any applications that are then opened on the pc will also sit between the two vis unless I give the labview app focus by clicking on it.

 

Is there anyway of stopping this happening as it does not look particularly good. Ideally if the main vi did not have focus the subvi would open behind the 'other' application.

 

A picture is attached - this is not the actual application just something I created to demonstrate the problem.

 

desktop.png

0 Kudos
Message 1 of 2
(2,749 Views)

Hi Nick,

 

There is a way of programmatically moving any window to the front. The can obviously be tweaked to how you want to use it and can be fitted into your existing code.

 

The code can be found on the following Knowledge Base link: http://decibel.ni.com/content/docs/DOC-4745

 

The is primarily for LabVIEW 8.6 but could be easily changed slightly to work within more recent versions of LabVIEW.

 

I hope this helps.

Kind Regards

Michael
NIUK Application Engineer
0 Kudos
Message 2 of 2
(2,718 Views)