Board index » delphi » how can I launch a windows program from my windows program

how can I launch a windows program from my windows program

I am trying to start an other program from my own program. In DOS you
can use EXEC but it is part of the DOS-unit and it is not in the
WINDOS-unit. I am using BP7.0 with Object Windows

Can anybody help me with this problem?

greetz Leon
m...@sprintlink.co.za

 

Re:how can I launch a windows program from my windows program


Quote
Man Machine Dynamics wrote:

> I am trying to start an other program from my own program. In DOS you
> can use EXEC but it is part of the DOS-unit and it is not in the
> WINDOS-unit. I am using BP7.0 with Object Windows

> Can anybody help me with this problem?

> greetz Leon
> m...@sprintlink.co.za

Try WinExec()?

Joe

--
Joe C. Hecht
Borland Delphi Developer Support Group
http://www.borland.com

Re:how can I launch a windows program from my windows program


   In Delphi, we have WinExec and ShellExecute.

   I'm almost sure that you can call the first but not sure for the
second.

   (the ShellExecute function is in ShellAPI unit -in Delphi, of course-)

M...@sprintlink.co.za (Man Machine Dynamics) wrote:

Quote
>I am trying to start an other program from my own program. In DOS you
>can use EXEC but it is part of the DOS-unit and it is not in the
>WINDOS-unit. I am using BP7.0 with Object Windows

>Can anybody help me with this problem?

>greetz Leon
>m...@sprintlink.co.za

--

          ___                                              ___
          L_|_                                            _|_J
         ( -O>                                            <O- )
      ___//\J  __________________________________________  L/\\___
     //-,\    |                                          |    /,-\\
    || / \\___L   AVONTURE Christophe (c) AVC Software   J___// \ ||
  _ ''/\/ '---J    Christophe.Avont...@is.belgacom.be    L---' \/\'' _
 / \ //\\.    |__________________________________________|    .//\\ / \
|_/\'/  ||                                                    ||  \'/\_|
     '   ||_         "Make sure that, always!, you            _||   '
         |__)       reply to my private mail adress"         (__|

Delphi Super Page: http://sunsite.icm.edu.pl/archive/delphi/_index.html
Delphi Super Site: http://sunsite.icm.edu.pl/~robert/delphi
Delphi Others:     http://www.coast.net/~jkeller
                   http://www.pobox.com/~bstowers/delphi

 "Postings are personnal, and don't reflect Belgacom's opinion"

Re:how can I launch a windows program from my windows program


M...@sprintlink.co.za (Man Machine Dynamics) wrote:

Quote
>I am trying to start an other program from my own program. In DOS you
>can use EXEC but it is part of the DOS-unit and it is not in the
>WINDOS-unit. I am using BP7.0 with Object Windows
>Can anybody help me with this problem?
>greetz Leon
>m...@sprintlink.co.za

Hmmm, I gues that in Winprocs unit is WinExec, a function from Win API

function WinExec (CmdLine : PChar; CmdShow : Word):Word;

Where CmdLine (PChar Pointer to an ASCIIZ) is an ASCIIZ String with
the name and parameters of the program you wanna run and CmdShow says
the way to execute or load it.

Regards

Other Threads