A simple and quick way to do this is to use the WEXIST() function. So if the caption of your main window of your app is 'My App', you would do something similar to this in your startup program.
IFWEXIST('My App')
QUIT&& Quit the app, already runningENDIF