I took that a bit further. If the app did exist I made it come to front Allen
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dan Olsson Sent: 14 July 2009 13:45 To: [email protected] Subject: Re: How to avoid two instances At 2009-07-14 13:11, you wrote: >I came across a code written by Ramani to avoid two instances of an >application in the same desktop. >It uses extensively the DDE functions, is there anything I should be >aware of ? Well you could use API-calls instead - here is some commented (and uncommented) code... DECLARE INTEGER FindWindow ; IN WIN32API ; STRING cNull,STRING cWinName IF WinExist(myapp) WAIT WINDOW 'MyApp already started ...' NOWAIT =BeepW(4) WAIT WINDOW ''MyApp already started ...'' TIME 3 CANCEL ENDIF 12/2235 - Release Date: 07/13/09 17:57:00 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/002001ca047a$856f8540$904e8f...@com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

