May need to build your own:
var
MyStr: PChar;
i, Length: Integer;
const
Size: Integer = 200;
begin
GetMem(MyStr, Size);
Length:=GetLogicalDriveStrings(Size, MyStr);
for i:=0 to Length-1 do
begin
if (MyStr[i]>='a')and(MyStr[i]<='z') then
Memo1.Lines.Add(MyStr[i]+':\');
end;
FreeMem(MyStr);
end;
From: [email protected] [mailto:[email protected]] On
Behalf Of John Bird
Sent: Friday, 20 May 2011 1:35 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] File/Dir Open at "My Computer"
I want to bring up a dialog to select a drive (Will be usually a removable USB
drive). Can I do this with any of the standard Delphi TOpenDialog or
SelectDirectory etc?
Ideally I want to bring up a dialog starting at My Computer...(D2007)
[Aside - I know how to show My Computer by starting Windows Explorer:
To start with my computer:
explorer.exe /n,/e,/select, c:\
To start with desktop:
%SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop
– it can show the drive but doesn’t return the drive letter to Delphi as it
comes up as a separate process of course]
John
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with Subject:
unsubscribe