Autor Beitrag
Newcomer91
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 22



BeitragVerfasst: Fr 19.03.10 10:05 
Morgen, ich bin gerade dabei eine Funktion für mein Programm zu schaffen, mit welcher ich n Item z.B. (c:\dokumente und einstellungen\blaa...) öffnen kann. Dachte das würde mit ShellExecute funktionieren, naja, programm compliliert auch, nur passiert nix wenn ich n item ausgewählt hab und aufn Öffnen Button drück ;(

Quelltext:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
end;

procedure TfrmBlabla.btnOeffnenClick(Sender: TObject);
begin
ShellExecute(Application.Handle, 'open''SelectedItemIndex'nilnil, SW_SHOW);

end;


Danke im Vorraus ;)

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Fr 19.03.10 10:19 
Du hast da zwei '' zuviel.

_________________
PROGRAMMER: A device for converting coffee into software.
Newcomer91 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 22



BeitragVerfasst: Fr 19.03.10 10:22 
sorry, komm jetzt gerad nicht mit..xD

2 " zuviel?
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Fr 19.03.10 11:18 
ausblenden Delphi-Quelltext
1:
ShellExecute(Application.Handle, 'open''SelectedItemIndex'nilnil, SW_SHOW);					

_________________
PROGRAMMER: A device for converting coffee into software.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Fr 19.03.10 12:58 
Und wenn SelectedItemIndex eine Variable der Listbox ist musst du das natürlich dem compiler auch sagen, sonst sucht er ewig eine lokale variable mit dem Namen "SelectedItemIndex" und anstatt was zu finden sucht er und sucht er und sucht er und sucht er...

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Fr 19.03.10 13:10 
Menno, ich dachte, den Folgefehler findet er dann alleine :D

_________________
PROGRAMMER: A device for converting coffee into software.