11 Vote

Delphi: Start other Application

Tip by Delphian | 2013-05-06 at 12:13

Today, I would like to show you how to start another program from your Delphi application. For this, you need nothing more than the ShellExecute command:

uses ShellApi;

...

ShellExecute(0, 'open', 'c:\prog.exe', nil, nil, SW_NORMAL);

Simply change "c:\prog.exe" in this function to the path and the filename of your program, you would like to execute. And don't forget: You have to add "ShellApi" to the uses clause.

Pass Parameters

How to pass some parameters to the external program when starting, you can read in my tip Start external program with parameters. Enjoy starting programs!

ReplyPositiveNegative

About the Author

AvatarThe author has not added a profile short description yet.
Show Profile

 

Related Topics

Delphi: System-Wide HotKey

Tutorial | 1 Comment

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.