Knowledge Base

ShellBrowser Delphi Components

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
   if Pos( ': ', ShellBrowser.ObjectName) > 0 then
      ListOfDrives.Items.Add (ShellBrowser.ObjectName);