LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Focus for keyboard input

I have a VI that, when started, starts another vi that runs in a
different part of the screen. I want the user to be able to use the
keyboard and the original VI be the one that receives the keyboard input
(key navigation, etc.). How do I get the focus back on the original VI
without "clicking" on it with the mouse?

-Stephen
0 Kudos
Message 1 of 3
(2,838 Views)
You could use a property node in the main vi to set its front panel to frontmost after you call the sub-vi.

See if the attached example helps

Brian
0 Kudos
Message 2 of 3
(2,838 Views)
Try using Property Node under Application Control. Set the class to VI.
Set FP.IsFrontmost to true. Wire the name of the original vi to the Open VI
Reference function and then wire the output vi reference to the property
node. This should return keyboard control to the original vi. If you want
a specific control within the vi to have focus initially, right click on the
control and create a property node. Select KeyFocus for the property,
select Change All To Write, and wire true to the property.

"Stephen" wrote in message
news:3B1E5AA7.BBD5A3E8@swri.org...
> I have a VI that, when started, starts another vi that runs in a
> different part of the screen. I want the user to be able to use the
> keyboard and the original VI be the one that receives the key
board input
> (key navigation, etc.). How do I get the focus back on the original VI
> without "clicking" on it with the mouse?
>
> -Stephen
0 Kudos
Message 3 of 3
(2,838 Views)