Using DDE to Check If Another Windows Application Is OpenLast reviewed: April 30, 1996Article ID: Q108681 |
The information in this article applies to:
When you are using dynamic data exchange (DDE) commands programmatically, there may be times when you have to determine if a session of an application is already running. DDESetOption() and DDEInitiate() can be used determine if a application is running or not. For example, the following code determines if Microsoft Excel is already open:
=DDESetOption("Safety",.f.) && This turns off the message box && so that the program will && not be interrupted. openapp=DDEInitiate("Excel","System") IF openapp < 0 && Any negative number returned && by DDEInitiate() means that a && channel could not be opened. RUN/N C:\EXCEL\EXCEL.EXE ENDIF |
Additional reference words: VFoxWin 3.00 FoxWin 2.50 2.50a 2.50b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |