1 (edited by rjkantor 2014-12-19 05:37:53)

Topic: How to use ShellExecute?

I would like to launch an external exe from within my MVD app.

I am getting an error with the following script.

uses ShellApi;

procedure MenuClick5 (Sender: string);     //copy Form
var
   filename: string;
begin
    filename := 'C:\program files (x86)\MVD Form Copier\MVDFormCopier.exe';
    ShellExecute(handle,'open',PChar(filename), '','',SW_SHOWNORMAL);
end;

The uses ShellApi; errors with identifier expected 1:6.  Then the ShellExecute is unknown.

Your help is appreciated.
  Rob

Re: How to use ShellExecute?

ShellExecute in current version is not support, instead use OpenFile

procedure MenuClick5 (Sender: string);     //copy Form
var
   filename: string;
begin
    filename := 'C:\program files (x86)\MVD Form Copier\MVDFormCopier.exe';
    OpenFile(filename);
end;
Dmitry.