Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Calling Shellexec


2 replies to this topic

#1 kvarnerexpress

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 407 posts

Posted 05 August 2005 - 07:54 PM

I am with problem - it would be great to call some external programm from Delphi, wait - till it executes and exits and only then continue work of my Delphi program, how can I do this. I tried ShellExec and ShellExecEx - however - it only calls program and exits - it would be great to registre some handler - which monitors when this called program exits?

Any design ideas for such an problem could be very helpful, thanks in advance


Kvarnerexpress

#2 Inspiron

    Trap Grand Marshal Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,204 posts

Posted 06 August 2005 - 10:03 AM

I don't know about Delphi and I came across the same problem with I was doing on Visual Basic.
What I did was to call a DOS prompt, you may like to try it.

#3 DeveloperX

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 130 posts

Posted 11 April 2006 - 07:09 AM

View Postkvarnerexpress, on Aug 5 2005, 07:54 PM, said:

I am with problem - it would be great to call some external programm from Delphi, wait - till it executes and exits and only then continue work of my Delphi program, how can I do this. I tried ShellExec and ShellExecEx - however - it only calls program and exits - it would be great to registre some handler - which monitors when this called program exits?

Any design ideas for such an problem could be very helpful, thanks in advance
Kvarnerexpress

well... guyz...

Shellapi.ShellExecute(
application.Handle,'open',pchar('program path'),pchar('parameters'),'',1
);

Note:
last parameter (1) gets window state!

maximazed, minimized, normal,focused,unfocused and so on...




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users