How to Find Out if Delphi is Running
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... }