Board index » delphi » Starting a Windows App from my App

Starting a Windows App from my App

Hi

Please help me, this is urgent.....

I simply want to start another windows application from within my
application, ptreferably destroying my application on the way. I have
absolut no experience with windows API or whatever, only newbie with
delphi.

Please show my an example that i may follow.

Thanks heaps
Jason

faz...@chch.planet.org.nz

 

Re:Starting a Windows App from my App


Quote
Jason Fazackerley wrote:

> Hi

> Please help me, this is urgent.....

> I simply want to start another windows application from within my
> application, ptreferably destroying my application on the way. I have
> absolut no experience with windows API or whatever, only newbie with
> delphi.

> Please show my an example that i may follow.

> Thanks heaps
> Jason

> faz...@chch.planet.org.nz

Type WinExec in the IDE put your cursor on it and hit CTRL-F1

Sylvain.

Re:Starting a Windows App from my App


In your forms on-close method add this line:

winexec('yourpath\yourwinfile.exe',SW_NORMAL);

or you could add these lines to any other method.

winexec('yourpath\yourwinfile.exe',SW_NORMAL);
close

in the first example, just before you program closes, it starts
the other windows program.

in the second example, your other windoes program starts then the
close method is called.

(don't do both, you with then have two instances of the other windows
program.)

Hope this helps,

Ash

Note: the preferred method of starting another application is the
createprocess function.

In article <01bbaf59$b3ac8a40$07423...@fazaks.chch.planet.org.nz>,
faz...@chch.planet.org.nz says...

Quote

>Hi

>Please help me, this is urgent.....

>I simply want to start another windows application from within my
>application, ptreferably destroying my application on the way. I have
>absolut no experience with windows API or whatever, only newbie with
>delphi.

>Please show my an example that i may follow.

>Thanks heaps
>Jason

>faz...@chch.planet.org.nz

--
Grim.
"I don't think you understand, I am The Grim Reaper."

Re:Starting a Windows App from my App


On 1 Oct 1996 05:31:23 GMT, "Jason Fazackerley"

Quote
<faz...@chch.planet.org.nz> wrote:
>Hi

>Please help me, this is urgent.....

>I simply want to start another windows application from within my
>application, ptreferably destroying my application on the way. I have
>absolut no experience with windows API or whatever, only newbie with
>delphi.

>Please show my an example that i may follow.

procedure TForm1.Button1Click (Sender : Self);
begin
  WinExec ('NOTEPAD.EXE', SW_SHOW);
  Close;
end;

hope this helps
Meikel Weber
m.we...@public.ndh.com
Make sure you visit my homepage
http://ourworld.compuserve.com/Homepages/meikel/mew.htm

Other Threads