潇潇 发表于 2011-10-12 19:53:00

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]
查看完整版本: Delphi XE 环境下带参数启动EXE主程序(ShellExecute用法)