From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bring a windows program to the front

Solved!
Go to solution

I searched for this but didn't find anything that answered my question.

 

Is it possible to control programatically which windows programs are at the front?

 

So if I was running a vi (which is on top) and I needed to automatically bring a running windows program to the front??

 

Then when I was done bring the running vi back to the front.

 

How can that be done?

 

Thanks

Rick.

 

 

 

0 Kudos
Message 1 of 5
(2,545 Views)

I do this all the time. You use Windows API calls to do this. Using Code Interface Nodes to user32.dll will get the job done. The shortest path is to get a copy of the G Toolbox by George Zou. Just search for his name on the forums here. It's a cheap investment and it saved my bacon.

 

Norm

0 Kudos
Message 2 of 5
(2,534 Views)

OK thanks I was really hoping for an code example to look at.

Any chance you have one to share?? 

0 Kudos
Message 3 of 5
(2,499 Views)

https://decibel.ni.com/content/docs/DOC-4551

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 5
(2,488 Views)
Solution
Accepted by topic author rcard53762

I downloaded both versions and the 8.6 version crashed my Labview every time. 

But the 2010 version seemed to work OK.

Thanks for the help.

0 Kudos
Message 5 of 5
(2,474 Views)