LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send keys to minimized window, anyway to do this?

Hi all. I am trying to figure out a way to send keyboard commands to minimized windows.  I currently must activate them before i can send commands, but thought maybe there was a way to send commands based on the window name or something.  Anyone have any ideas?
Thanks!
(labview 😎
0 Kudos
Message 1 of 12
(5,722 Views)
You didn't give a reason this wouldn't be possible, so I'll go ahead and suggest that you use an event structure with filter events.  Those are the ones with the red arrows and question marks.  They let you handle keypresses and other user interactions before they affect your VI.  Then you can just use a Value (SGN) property node to trigger an event in your other VI.
0 Kudos
Message 2 of 12
(5,716 Views)
Sorry, i should have been clearer.  The minimized windows are not vi's, but rather programs run from the control prompt. 
0 Kudos
Message 3 of 12
(5,708 Views)

Hi dirtyb15,

see this thread http://forums.ni.com/ni/board/message?board.id=170&thread.id=252582&page=2. If you download the zip file there is a vi to minimize other windows.

Mike



Message Edited by MikeS81 on 03-31-2008 08:58 PM
0 Kudos
Message 4 of 12
(5,698 Views)
Thanks for the link. any chance you could resave for 8.0, i dont have 8.5
Also, Is this just how to minimize window, or does it allow you to send key's to a minimized window? I am currently activating the other windows using the find name ect.. then using the winutil library to send keys to activated window. Im just trying to figure out a way to send keys to the windows while they are still miminized so i can run the entire program in the background..
 
0 Kudos
Message 5 of 12
(5,692 Views)

Hi dirtyb15,

there is a vi with which you can send key inputs and another one to set ShowWindow functions. First time i can save it for 8.0 is tomorrow morning.

Mike



Message Edited by MikeS81 on 03-31-2008 09:20 PM
0 Kudos
Message 6 of 12
(5,687 Views)

Hi dirtyb15,

here is only the part to minimize the window for LV80.

Mike

0 Kudos
Message 7 of 12
(5,662 Views)
I know that this can be done in Visual Basic by using "Appactivate" method. It activates an application and it doesn't matter if its window is minimized or not. But i don't know how to do this in LabView or if it is in a windows dll.
Anybody can help with this ?
0 Kudos
Message 8 of 12
(5,599 Views)
Hi CorCar,
did you see the example? This example use the user32.dll.
Mike


Message Edited by MikeS81 on 04-06-2008 07:26 PM
0 Kudos
Message 9 of 12
(5,587 Views)

Mike:

  Thanks for your advice, but i think this example first restores or maximizes the application window and then sends the keys, and what i am looking for is a method to send keys to a minimized window.

 

0 Kudos
Message 10 of 12
(5,519 Views)