LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send 'ALT+TAB' to windows by Labview to activate another program?

Hi, everyone
I have my Labview program which reads datas from another antenna control program 'ARSWIN' through DDE. The problem is this 'ARSWIN' will only read the datas from hardware when it is activated. So when the Labview program is activated (that means the ARSWIN is deactivated), ARSWIN won't read any datas from hardware.
One possible way to solve this problem is to activate it manually (and then back to LV) by pressing 'ALT+TAB' from time to time. But I want to do this by LV automatically for example every second.
Is there any way to sendkeys like 'ALT+TAB' to windows and to switch between my Labview program and the ARSWIN?
or if you have a better solution for my problems here.
Thank you!
 
0 Kudos
Message 1 of 3
(3,138 Views)
If you have 3rd application running, 'ALT+TAB' might not get you the window you want.
The right way to do this is using Windows API to activate the window you want.
There are a few way to do that.  The easy way is download lvwutil32.zip from NI.
Either Move Window to Top.vi or Show Window.vi will work.
 
George Zou
 
George Zou
0 Kudos
Message 3 of 3
(3,125 Views)