How to start a APP only once ?

Hubert Brandel

Active Member
Licensed User
Longtime User
Hi,

Is this possible or how to do ...

The APP is started by the user first.
Then he tries to start it a second time (the first app is not visible) by mistake.

1. Can I get the info that this app is still running and change without anything to the running app and close the second one.
2. If 1 is not possible, msgbox an error 'still runnig, switch to it ...' and close the second one ?

In Win32 there is a API function to get the names of all running apps, but is this possible here too ?

If not, can I create a 'flagfile' which is deleted on the end of the app, even if an error crashed the app ?

Any ideas ?
 
Part true.

In my case it closes the current and use the new (just opened) instance of the app
What do you mean? What happens in your case?

As long as the app is in memory, it will resume from the same state, same instance.
If it is booted out of memory, then it will start from the beginning, but it is your job to make sure it retains state.
 
Upvote 0
Back
Top