FAQs & 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

You can use the OnBeforeShellCommand event and use the AllowExecute parameter to prevent the execution. The Command parameter when opening a folder might be "default", "open" or also "goup". If you have more ShellBrowser components linked with a ShellLink you can use the OnNavigating event to centrally restrict or prevent path access.

You can use the OnAddFolder event with a statement like this:
CanAdd := not (GetDriveType(PChar(Path)) in [DRIVE_REMOVABLE]);

This will exclude the floppy drive. It is also possible to exclude other drives like the CD-ROM (DRIVE_CDROM).

The thumbnail images show a black background if your application does not include a proper XP manifest. Windows then loads the old Windows 2000 version of ComCtl32.DLL which cannot deal properly with alpha channels.
To solve this please include the unit "XpMan" somewhere in your project or set "Project > Options > Application > Runtime Themes" to the value "Enable runtime themes".

If the new icon is also part of the system image list, then this can be easily achieved using the OnGetImageIndex event of the JamShellList. You can get the full name and path of a specific item in the list using the GetFullPath method.
To get the index of a specific file type icon, you can use the GetIndexFromExtension method of the TJamSystemImageList component.

Since the system image list is a global resource that is shared among all applications it cannot be changed easily. To add your custom icon to this image list you must register a file extension (a dummy one if necessary) with your icon in the system. This is done via the registry and you can use a helper method in ShellBrowser for the registration of the icon.

Note: Many installation builders can register icons for a specific file extension, e.g. InnoSetup

You can use a statement like this:
ShellList.Selected.IsFolder;