Home > Delphi / Kylix IDE > How to Find Out if Delphi is Running

How to Find Out if Delphi is Running

December 15th, 1999 Leave a comment Go to comments

You may want your program to check if Delphi is running. Well, if so try out this code. This is the method for programs:

function IsDelphiRunning: Boolean;
begin
  Result := (FindWindow('TAppBuilder', nil) > 0);
end;

If you want to check if Delphi is running and you are creating VCL components then you should check for the csDesigning flag.
Here’s the code:

  if csDesigning in ComponentState then
    { Delphi IDE is running }
  else
    { Well, Delphi IDE is not running... }
  1. No comments yet.