LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bring a background window forward

Hello,

 

I have another project that sends the Labview window to minimize.  Then when a PLC process completes, a bit is read, and the labview window opens and a dialog box asks if a printout completes.  My question is that the bringing  window to the front part of my program is very unreliable, especially if one or more windows have been activated/opened and worked on.  How can I make that function more robust?

0 Kudos
Message 1 of 10
(2,974 Views)

galimba, can you show us the function you are talking about? What is the code you are using to control the LabVIEW window you are talking about?

0 Kudos
Message 2 of 10
(2,966 Views)

Here's the program attached.  I think it might be easier to call a subVI that controls the front window panel, but I'm not sure.

0 Kudos
Message 3 of 10
(2,957 Views)

I don't understand why you're trying to bring the calling VI to the front. The VI's front panel does not need to be shown in order to see the dialog box.

0 Kudos
Message 4 of 10
(2,950 Views)

The assumption there was that if the calling vi window is up front, then the dialog box would pop up in front of that, making it the front-most window.  Not elegant, but about 50% successful.

0 Kudos
Message 5 of 10
(2,948 Views)

But you don't need to do so, right? All you need is the dialog. In fact, you don't even need to do that, as you can write your VI so that it behaves the same way. See attached for an alternative.

0 Kudos
Message 6 of 10
(2,944 Views)

I would suggest following altenbach's advice.  There is no need opening a fp of a vi if it does not need to be opened.  The dialog box will open on its own, regardless of what vi it happens to be in.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 7 of 10
(2,941 Views)

is smercurio = altenbach? I'm confused. . .

 

Well, I kind of stripped the vi down to the basic parts in question.  So a report is generated that reads filename entered into a directory.  That report then gets printed and the dialog box should pop up to the front - asking if the report printed correctly.  How do I get more control over the popup dialog box?  If the Report Txt Gen MOD.vi is used as the dialog, by calling it as a subVI, that vi would become the active window (with some vi call tweaks)?

0 Kudos
Message 8 of 10
(2,937 Views)

Sorry, no. I thought it was Altenbach who posted.  Follow smercurio's advice.Smiley Surprised

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 9 of 10
(2,931 Views)

@galimba wrote:

is smercurio = altenbach? I'm confused. . .


Hah! Don't I wish! Smiley Very Happy

 


 Well, I kind of stripped the vi down to the basic parts in question.  So a report is generated that reads filename entered into a directory.  That report then gets printed and the dialog box should pop up to the front - asking if the report printed correctly.  How do I get more control over the popup dialog box?  If the Report Txt Gen MOD.vi is used as the dialog, by calling it as a subVI, that vi would become the active window (with some vi call tweaks)?

The VI I uploaded is configured to show itself when called and close itself afterwards. If you place it in the block diagram of a VI and run the higher level VI you will see this. What kind of control are you looking for?

0 Kudos
Message 10 of 10
(2,926 Views)