Solved

Multiple instances of a program

Posted on 1997-03-15
1
218 Views
Last Modified: 2010-04-04
How do i check if theres already a copy of my program running on the system ??
0
Comment
Question by:Daydream
1 Comment
 

Accepted Solution

by:
morwoodk earned 50 total points
ID: 1334766
You need to use the caption of your application to check for other instances of the same.  For this reason it is a good idea to come up with a fairly unique application caption.

To check for other instances of your application use the following:

anAppHandle := FindWindow( nil, 'Your application caption');

anAppHandle is of type HWND and will be nil if there are no other instances loaded.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question