Eurico, Or you could use scripting if it is allowed: ******* * Start of Code * LOCAL llQuit *!* Check for instance(s) of Myapp running oManager = GETOBJECT([winmgmts:]) cQuery = [select * from win32_process where name='myapp.exe'] oResult = oManager.ExecQuery(cQuery)
IF oResult.Count > 1 llQuit = .T. ENDI *!* Clean up oManager = .NULL. oResult = .NULL. RELEASE cQuery, oResult, oManager IF llQuit && Myapp.exe running twice QUIT ENDIf * * End of Code ********* Dave Crozier -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Eurico Chagas Filho Sent: 14 July 2009 12:12 To: 'ProFox Email List' Subject: How to avoid two instances 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 ? TIA, E. [excessive quoting removed by server] _______________________________________________ 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/9aad6f504b1d40359d2cbcb4987bb...@develop ** 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.

