[DUG] File/Dir Open at "My Computer"
David O'Brien
Dave at iccs.co.nz
Tue May 24 09:49:23 NZST 2011
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: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110524/c776d886/attachment-0001.html
More information about the Delphi
mailing list