Selecting a directory with TOpenDialog
You can use the TFileOpenDialog (on Vista+): with TFileOpenDialog.Create(nil) do try Options := [fdoPickFolders]; if Execute then ShowMessage(FileName); finally Free; end; Personally, I always use the TFileOpenDialog on Vista+ and fallback using the SelectDirectory (the good one!) on XP, like this: if Win32MajorVersion >= 6 then with TFileOpenDialog.Create(nil) do try Title := ‘Select Directory’; Options … Read more