(Gast)
n/a Beiträge
|
Re: Parameterübergabe bei ShellExecute
27. Sep 2007, 14:59
Hallo,
Delphi-Quellcode:
Procedure TForm1.Button1Click(Sender: TObject);
Var
sParameter: String;
sFileName: String;
Function QuotedStr(_sString: String): String;
Begin
Result := #034 + _sString + #034;
End;
Begin
sParameter := Format('/parameter_eins="%s" /parameter_zwei="%s"',
[OpenDialogServer.FileName, OpenDialogGame.FileName]);
sFileName := QuotedStr('C:\Programme\Test\Test.exe');
ShellExecute(
Application.Handle
'open',
PChar(sFileName),
PChar(sParameter),
PChar(ExtractFilePath(sFileName)),
SW_SHOWNORMAL);
End;
Edit: neu formatiert
|
|
Zitat
|