Autor Beitrag
stigge
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Mo 05.02.07 19:44 
Ich habe eine etwas komische Frage:
Das Laufwerk C kann man mit C:\ aufrufen.
Wie aber kann man den Arbeitsplatz aufrufen?
Etwa mit Arbeitsplatz:\ ???



Moderiert von user profile iconTino: Titel erweitert
Moderiert von user profile iconKlabautermann: Topic aus Sonstiges (Delphi) verschoben am Di 06.02.2007 um 15:31
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 05.02.07 19:55 
Meinst du im Explorer anzeigen?
Führ einfach das aus: %SYSTEMROOT%\explorer.exe /n,/e,
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Mo 05.02.07 19:58 
Ich will eben bei opendialog als Startordner den Arbeitsplatz haben (bei delphi)
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Mo 05.02.07 21:01 
kann ich einfach den code von jaenicke benutzen?
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 05.02.07 23:30 
Hallo,

user profile iconjaenicke sprach vom Explorer, der Opendialog ist was anderes.

Aber probier es doch einfach aus, der Opendialog beisst schon nicht. :wink:

Solche Systemvariablen, sofern sie ein Verzeichnis oder Laufwerk repräsentieren, kann man an OpenDialog als InitialDir übergeben.
Darüber kann man auch den Desktop als Startverzeichnis festlegen.
Der Arbeitsplatz ist kein Verzeichnis, aber es gibt eine Möglichkeit.
Ein paar Beispiele:
ausblenden Delphi-Quelltext
1:
2:
3:
InitialDir := '%SYSTEMROOT%';                            //C:\Windows, je nach dem ...
InitialDir := '%USERPROFILE%\Desktop';                   //Desktop
InitialDir := '::{20D04FE0-3AEA-1069-A2D8-08002B30309D}';//Arbeitsplatz

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Di 06.02.07 13:28 
Darauf wäre ich nie gekommen^^
Funktioniert auf jeden Fall.
Danke!