![]() |
Pfad im Explorer öffnen
Hi,
wie kann ich einen String, zum Beispiel mit dem inhalt 'C:\aaa\bbb\ccc' im explorer öffnen? |
Re: Pfad im Explorer öffnen
Hi,
ebenfalls mit der altbekannten Funktion [dp]"ShellExecute"[/dp]. Chris |
Re: Pfad im Explorer öffnen
Sprich also so:
Code:
Und vergiss nicht "ShellAPI" bei uses einzubinden. ;)
ShellExecute(Handle, nil, 'C:\aaa\bbb\', nil, nil, SW_SHOW);
|
Re: Pfad im Explorer öffnen
Yo, hatte es schon mit ShellExecute versucht, aber da kam als ein Feherl!
Danke an bzw. für die Schnelle Hilfe, Gruß, St.Pauli |
Re: Pfad im Explorer öffnen
OK, hab das ma eingegeben, aber es kommt wie vorher auch: 'Incompatible Types... String and PAnsiChar'
Dazu muss ich sagen (Sorry, hab mich vieleicht ein bisschen blöd am anfang in der ersten nachricht ausgedrückt) ich will einen String öffnen, also:
Code:
da der Pfad erst im Programm bestimmt wird
VAR Pfad : string;
begin Pfad := 'C:\a\b\c\'; ShellExecute(Handle, nil, Pfad, nil, nil, SW_SHOW); end; |
Re: Pfad im Explorer öffnen
Code:
oder
VAR Pfad : string;
begin Pfad := 'C:\a\b\c\'; ShellExecute (Handle, nil, PChar (Pfad), nil, nil, SW_SHOW); end;
Code:
so.
VAR Pfad : PChar;
begin Pfad := 'C:\a\b\c\'; ShellExecute (Handle, nil, Pfad, nil, nil, SW_SHOW); end; (Edit: Da war ne Klammer zuviel drin ^^) |
Re: Pfad im Explorer öffnen
OK, thx :-D :-D :-D
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:49 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz