LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control another window through labview 6.0.2

I have LabVIEW 6.0.2. (wont be able to upgrade due to qualification issues involved). My Laview program needs to open another program thats written in VB.Net (by someone else). The two programs communicate through TCP. I can open the other program the first time and can also communicate with it fine. The problem is when the other program's window is minimised, I need to be able to restore it by clicking a button on my labview program. how do I accomplish this?
Any ideas?
Thanks a lot,
Niren
0 Kudos
Message 1 of 6
(3,016 Views)
You need to use window API's to do that.

In short:

Find the hWnd of the other application (with FindWindow)
Send a message to it (SendMessage)

Let me know if this is detailed enough. There might be OpenG functions to do
this.

Regards,

Wiebe.


0 Kudos
Message 2 of 6
(3,000 Views)
Pardon my ignorance, but does that mean I can do it by writing a vi in labview 6.0.2? Or do I need another exe that handles this?
If you could provide an example, that would help.
Thanks for your response.
Niren
0 Kudos
Message 3 of 6
(2,993 Views)

"Niren Joshi" <x@no.email> wrote in message
news:1197034805005-623203@exchange.ni.com...
> Pardon my ignorance, but does that mean I can do it by writing a vi in
labview 6.0.2? Or do I need another exe that handles this?If you could
provide an example, that would help.Thanks for your response.Niren

Yes, you can do that in LabVIEW 6.0.2. Or in VB if that's easier. The
functions I am refering to, are part of Windows. They are stored in a
windows dll (user32.dll). You can call those functions with a labview node
called "Call Library Node". See the Calling External Code document (from NI)
for information on how to use them. The functions themself are explained in
the microsoft SDK.

I can't save back to 6.0.2 from 7.1...

Regards,

Wiebe.


0 Kudos
Message 4 of 6
(2,991 Views)
NI has VIs to restore a minimized window using Windows API.
 
George Zou
 
George Zou
0 Kudos
Message 5 of 6
(2,982 Views)
Thanks a lot! That solved my problem - there is a Move window to Top.vi in the winutil.llb which does the job.
I got the Labview 6.0 version here  -
http://sine.ni.com/apps/utf8/niepd_web_display.display_codeset?p_guid=B45EACE3EE2756A4E034080020E748...

Message Edited by Niren Joshi on 12-07-2007 04:24 PM
Message 6 of 6
(2,970 Views)