Autor Beitrag
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mi 30.10.02 19:06 
hallo,
ich habe eine string aus der registry geladen ( nur text, der den Pfad einer datei angibt !). den string habe ich mit einer variabel verknüpft var datei:string;
nun hab ich dann folgendes getan, um diese datei zu öffnen:
ausblenden Quelltext
1:
ShellExecute(Handle, 'open',datei,'', nil, SW_SHOW);					

wenn ich jetzt [F9] drücke, und das programm testen möchte, dann wird mir die zeile rot makiert. ich hab auch schon die shellapi in den klausel (oder so) aufgenommen.
also, was hab ich falsch gemacht ??
mfg hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Mi 30.10.02 19:18 
proiers mal hiermit:

ausblenden Quelltext
1:
ShellExecute(Handle, 'open',PChar(datei),'', nil, SW_SHOW);					


Du musst deinen String in ein PChar umwandeln :wink:

_________________
Viele Grüße
Jakob
Raphael82
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67



BeitragVerfasst: Do 31.10.02 01:38 
Titel: Also..
Also ich weiß ja ned was hier für Delphiversionen diskutiert werden doch ShellExecute sollte in deinem Fall eigentlich so aussehen:

ausblenden Quelltext
1:
ShellExecute(Apllication.Handle,'open',PChar(Datei),nil,nil,sw_ShowNormal);					


MfG, Raphael

_________________
Share your knowledge to receive perfection!
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Fr 01.11.02 18:06 
vielen dank !

mfg hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej