LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX to open and close application

I am new to LV (have 6.1).  What I want to do is open up an external application when a certain LV action is performed (like a boolean button, or something similar), minimize the LV application (will use Application Builder here), and close it when a different LV action is taken (a different boolean button, or something similar).  I need to keep the LV app running while this other app runs so I can perform other minor tasks simultaneously.  The external app needs to close so the LV app can regain control of the serial ports, among other things.
 
From what I've gathered so far on LV and ActiveX, there's a set of things one can do.  Lots of stuff with dialog boxes, and other things like that built into Microsoft, and MS programs (Excel being quite popular).  This external program is a custom program.
 
Any ideas?
0 Kudos
Message 1 of 5
(3,352 Views)
anyone?
0 Kudos
Message 2 of 5
(3,341 Views)
Well, it all really depends on the custom program and how it was written. Does it have an ActiveX interface? If it does, than that's the easiest way to go. If you put an automation refnum on the fron panel, you can right click and it and choose Select ActiveX Class>Browse. The browser will list all of the ActiveX type libraries that are registered on your system. If you can find one that refers to your custom program, then you should be able to use it's methods and properties to control. If it does not have an ActiveX interface, then things get much more difficult.
0 Kudos
Message 3 of 5
(3,336 Views)
I see.  Our group did not write the application.  It was written externally, but I can ask them.  Let's assume for right now that it is not ActiveX.  What are my options for opening and closing this application (that is all I need to do)?  Is there any kind of spawn control to start it?  Or an interface to Windows that gets the process ID and then kills it?
0 Kudos
Message 4 of 5
(3,333 Views)
To start an application, you can use the System Exec function on the Communication palette. You can get functions to manage and control windows, including closing, in the Windows API Functions.
Message 5 of 5
(3,325 Views)