天天看點

delphi調用外部EXE

調用windows系統時間設定對話框:

WinExec('Rundll32.exe   Shell32.dll,Control_RunDLL   timedate.cpl,,0',SW_NORMAL);

delphi調用外部exe程式

procedure TForm1.btn14Click(Sender: TObject);
var
SystemPath:string;
begin
SystemPath:=GetCurrentDir;
ShellExecute(application.Handle,'open',PChar(SystemPath+'\yourexe.exe'),'-s','',SW_SHOWNORMAL);
Form1.Close;
end;