FAQ & Knowledge Base

Welcome to our Knowledge Base. Search or browse through the topics below to find answers to your questions.

Categories: ShellBrowser Delphi Components | Show all categories

List of valid drives

Question / Problem

Is there a function to retrieve a list of valid drives in ShellBrowser?

Answer / Solution

What we have is the JamDriveList control. a listview with all valid drives in it.

What you could also do is to set TShellBrowser.SpecialFolder property to SF_DRIVES and then use the TShellBrowser.Next() to enumerate "My Computer":

ShellBrowser.SpecialFolder := SF_DRIVES;
While ShellBrowser.Next do
begin
   if Pos( ': ', ShellBrowser.ObjectName) > 0 then
      ListOfDrives.Items.Add (ShellBrowser.ObjectName);
end;