[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Multiple instances of a program

How do i check if theres already a copy of my program running on the system ??
0
Daydream
Asked:
Daydream
1 Solution
 
morwoodkCommented:
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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now