> I created a component to force one instance per application. > > More info here: http://wiki.lazarus.freepascal.org/UniqueInstance
Was wandering if lock files could be used instead as more cross-platform way. First instance could make the lock file, the other instances could find the lock file and just return. User could delete the lock file manually if app fails to delete it. Problem is though: 1) need to notify running app somehow to come to front (maybe if it polls the lock file for something being written into it or if there's some notification for such action [I don't think there is]) 2) the possibility of app remaining locked after a crash and user having to delete a lock file manually is bad in usability terms (although I remember [years ago] various Unix apps used to do that thing). On Windows btw, there are better ways than TCP/IP to do this stuff, for example custom window messages or unique window names (using a GUID/UUID maybe to guarantee uniqueness) ---------------- George Birbilis ([EMAIL PROTECTED]) Computer & Informatics Engineer Microsoft MVP J# for 2004-2006 Borland "Spirit of Delphi" 3D, QuickTime, QTVR, Java, Delphi, ActiveX, .NET components, Robotics http://www.kagi.com/birbilis http://birbilis.spaces.live.com _____ avast! Antivirus <http://www.avast.com> : Outbound message clean. Virus Database (VPS): 0657-0, 12/12/2006 Tested on: 16/12/2006 10:12:49 ?? avast! - copyright (c) 1988-2006 ALWIL Software. _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives