Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine if application running through Delphi

Status
Not open for further replies.

vincer

Programmer
Mar 12, 2002
45
0
0
GB
Is there a way of determining whether an application is being run through the delphi environment?

Thanks
 
very simple (need at least delphi 5)

Code:
function IsDebuggerPresent(): Boolean; external 'kernel32.dll';

procedure TForm1.Button1Click(Sender: TObject);
begin
  if IsDebuggerPresent() = True then
    ShowMessage( 'Debugger or IDE detected' )
  else
    ShowMessage( 'Debugger or IDE NOT detected' );
end;

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Thankyou,
I thought there would be a nice easy function somewhere
but I didn't know where to look.

 
A similar sort of question. Is there a way to tell if an application with the same name is already running before your program opens? i.e. if it is already running then you can close the new instance.
 
paubri, although your question may be related, it is still a different question - so please post this as a separate thread. You are more likely to get responses if you do.

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top