LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

closing windows applications

I have read several answers to similar questions about closing windows applications from inside LabVIEW. However, all of them refer the reader to files that I can't get to!! Can anyone help?
0 Kudos
Message 1 of 6
(3,323 Views)
Hi,
you can use Windows API Function Utilities (32-bit) for LabVIEW.
Use "Quit Application.vi" from "winevent.llb" (which is included in this set of utilitis) to solve your problem.

Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 6
(3,323 Views)
Thank you for your link, but like the others I have tried it only gets me so far as a "this page can not be displayed" error. Would you be able to attach the file instead?
0 Kudos
Message 3 of 6
(3,323 Views)
Hi,

This is the link of the document that Oleg pointed you to.
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3EF4556A4E034080020E74861&p_node=DZ53008&p_submitted=N&p_rank=&p_answer=&p_source=External

Try copying the above link to notepad , remove the extra spaces in between and you should be able to open the link then. In case you are still not able to open it, this is what the text of the above document states:

"These VIs make calls to the Windows Application Programming Interface (API) for managing and controlling windows (minimize, maximize, move, resize, rename, close, and so on); managing applications (run application, quit application, print file, and so on; adding and removing network resources; ke
yboard filtering; and system utilities (mouse cursor position, windows path, screen resolution, system path, and so on). These VIs are intended for use only on 32-bit Windows platforms.

A related example that ships with LabVIEW is labview\examples\viserver\uicntrl.llb\Ghost in the Machine.vi"

Also I am attaching the zip file for the VIs that the same document is referring to.

Regards,
Ankita A.
Message 4 of 6
(3,323 Views)
Thanks so much for attaching the file - that worked great. Unfortunately, when I use these VI's I can't open files smoothly. The "Run Application" only seems to work if I've already started that program. If not, the program (Window's On-Screen Keyboard) shows up but I get an error when I try to get a reference number for it so that I can later hide it. Also, do you know of a way that I can prevent users from closing the keyboard program, or simply have it hide the program window instead of closing it?

Thanks for your help!!
0 Kudos
Message 5 of 6
(3,323 Views)
Hi,

These Windows API VIs require the associated program to be in windows memory. So you cannot run a program using "Run Application" if it's window is not open. About hiding the program window, in the zip file that I attached in my last answer, refer to the readme file where it states that the "winutil.llb(also in the zip folder)" has a "Hide Window.vi".

Regards,
Ankita A.
National Instruments
0 Kudos
Message 6 of 6
(3,323 Views)