There's a simple example of this on my website - under tips and tricks.
>I'm trying to prevent a user from opening a Foxpro 5.0 application more than one time. Right now I'm loging a flag to a Foxpro table and resetting it when they log out of the application. Problem is when there is a power outage or the pc has to be rebooted without properly exiting the application, the flag has to be reset manually by the user.
>
>Is there another way to prevent multilple instances of an application from being opened?