How can I tell if another instance of my program is already running?

You can create a Semaphore stop the second execution and bring you running application to the screen. The aFormName is the name of your main form class in your application. Copy the code bellow into your *.dpr file.