From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

How to programatically select current application window.??

I want to programmatically select the main window, after a subVI has been closed. I need to do this to avoid the need of the user to click on the main window. I'm in need of this also, because in my main window I have a CONTROL STRING which is in the wait of scanner keyboard input; the cursor/key focus dissappears when subVI's pop up. So I was wondering how to "SELECT THE MAIN WINDOW PROGRAMMATICALLY?".

 

Please help!!

 

0 Kudos
Message 1 of 3
(2,621 Views)

It sounds to me as though you asked the wrong question.  If I understand your description, you have a sub-VI that "pops up" (i.e. is written as a Dialog Window), and when it exits, you want the Key Focus to be associated with a String Control.  Take a look at the String Control property "Key Focus" -- if you set this to True when the sub-VI exits (if your sub-VI follows Best LabVIEW Practice and has an Error Out connection, wire this Error Out to the Error In of the String Control Property node and it will run at the right time), then the Key Focus will be set, as desired, on your String Control.

 

Bob Schor

 

P.S. -- if your Sub-VI is still "visible" when it exits, then set its Property to Close on exit, or add an Invoke Node when it exits to close its Front Panel.

0 Kudos
Message 3 of 3
(2,564 Views)