03-03-2017 04:59 PM
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!!
03-03-2017 10:28 PM
03-04-2017 11:57 AM - edited 03-04-2017 12:00 PM
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.