Autor Beitrag
X-Cape
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32

Win XP Prof.
Delphi 7 PE
BeitragVerfasst: Do 24.11.05 09:58 
Hi,
ich mache ein Programm, wo ich ein Programm anhand des Pfades im Editfenster ausführen will.
Muss ich den String zu PAnsiChar konvertieren, oder wie geht das?
Hat einer eine Idee??

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1Click(Sender: TObject);
var Pfad:PAnsiChar;
Pfad:=Edit1.text; //Das muss anders beschrieben werden
ShellExecute(handle,'open',Pfad,'','',sw_shownormal);
end;


Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt.
WASEO
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 56

Win98, Win2000, WinXP
D6 Prof, D7 Prof
BeitragVerfasst: Do 24.11.05 10:02 
Hallo!

Versuchs mal so:
ausblenden Delphi-Quelltext
1:
ShellExecute(Handle,'open',PChar(Edit1.Text),nil,nil,SW_SHOWNORMAL);					


Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt.

_________________
Erstaunlich sind nicht die Dinge, die wir nicht kennen, sondern die wir kennen und die nicht so sind.
X-Cape Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32

Win XP Prof.
Delphi 7 PE
BeitragVerfasst: Do 24.11.05 10:06 
Hi,
das ging ja Schnell ;-)
Danke, das funzt!!
X-Cape