Delphi XE 环境下带参数启动EXE主程序(ShellExecute用法)
procedure TForm1.Button1Click(Sender: TObject);begin
opendialog1.Filter :='程序文件(*.exe)|*.exe';//
if opendialog1.Execute(self.Handle)= True then
begin
edit1.Text := opendialog1.FileName ;
ShellExecute(0,'open',pchar(edit1.Text),pchar(edit2.Text),pchar(edit1.Text),1);
end;
end;
页:
[1]