Autor Beitrag
oPPi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 66

MS Win 7 Pro, WinXP Pro
D3 Pro, TurboDelhi, Kylix 3 Pro
BeitragVerfasst: Mo 22.07.02 22:47 
Hallo,

hab auch mal so ne ganz doofe Frage:

Wie kann ich eine Datei (*.exe) die in meiner FileListBox angezeigt wird
per DblClick oder per Button-Aktion ausführen?


Gruß

oPPi :roll:

... Manchmal kommt man nicht auf die einfachsten Sachen obwohl
die Lösung ganz nah liegt ...
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Mo 22.07.02 23:11 
Mal ne ganz dumme Antwort: Wie wär's mit ShellExecute?

Hier mal ein Beispiel (im OnDblClick-Ereignis eintragen):
ausblenden Quelltext
1:
2:
3:
  with FileListBox1 do
    ShellExecute(Handle, 'open', PChar(FileName), '',
                 PChar(ExtractFilePath(FileName)), SW_SHOW);
Gruß wulfskin!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
oPPi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 66

MS Win 7 Pro, WinXP Pro
D3 Pro, TurboDelhi, Kylix 3 Pro
BeitragVerfasst: Mo 22.07.02 23:29 
Titel: Ohne Worte
hy wulfskin,

war schon drann mit ShellExecute, aber leider ... :oops:

Wie schon gesagt

... Manchmal kommt man nicht auf die einfachsten Sachen obwohl
die Lösung ganz nah liegt ...

Aber deine Lösung funktioniert einwandfrei.

Thanks

Gruß

oPPi