Knowledge Base

ShellBrowser Delphi Components

Hallo und herzlich Willkommen in unserer Wissensdatenbank.
Unsere Fachexperten liefern hier Antworten auf die häufigsten Fragen unserer Kunden.
Beginnen Sie Ihre Informationssuche hier, um schnell und einfach auch Ihre Antwort zu finden.
Geben Sie bitte einen Suchbegriff ein oder wählen Sie eine der obenstehenden Kategorien aus.

Alle Einträge (Seite 2 / 5)

How do I get the check status of an item?


How do I check all items of the currently selected path in a JamShellList?

use the following line:


How do I reset all checkboxes to an unchecked state?

use the following command:


How can I determine in a TJamShellList the full path of a file including its extension, if the user has turned off extensions in his Windows Explorer settings?

You can use TJamShellListItem.FullPath, or JamShellList.SelectedFiles, which will return a full file name that always includes the extension.

How can I select the columns that are (initially) displayed in the TJamShellList?

Each Windows Shell extension may define which columns will be displayed for its view.To add or remove specific columns, use the OnCreateColumns event in combination with SetColumnVisibility. 

uses ShellBrowser;

procedure TForm1.JamShellListCreateColumns(Sender: TObject);
const FirstPass: Boolean = True; 
   if not FirstPass then
   FirstPass := False;

   with JamShellList do
       SetColumnVisibility(TShellColumns.Size, False);
       SetColumnVisibility(TShellColumns.Author, True);

When I move to certain folders (e.g C:\Windows\assembly) Delphi displays an error message like: "Could not get IShellFolder2 interface for current folder". How can I prevent this?

This message is triggered by a handled excpetion. In the default configuration, RAD Studio stops on all exceptions, if handled or not. The end-user will not see errors like this for handled excpetions. Using exceptions for error handling is common in modern programming languages.
We recommend turning off this option:
"Tools > Options > Debugger Options > Language Exceptions > Notify on Language Exceptions".

How can I prevent actions that are caused by key presses, e.g. a FullRefresh by F5?

Use the OnKeyDown event like this and overwrite the Key value:

procedure TForm1.MyistKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
   // suppress a FullRefresh by F5
   if (Key = VK_F5) then
      Key := 0;

How can I check if a file is currently in the clipboard?

Just use this line of code:

How can I show XYZ as a thumbnail?

The thumbnails are generated through the same Windows API function that the Windows Explorer uses, and so the ShellBrowser components will show similar thumbnails like the Windows Explorer.

To provide thumbnails for a certain file format that Windows does not support out of the box, it is best to register a thumbnail provider in the system.

Another option is to use the OnThumbnailUpdated event of the TJamShellList control, which allows you to change the generated thumbnail.

allows you to set one application-wide thumbnail provider that is called if the system does not supply one.

I get a memory leak report that an instance of TComboBoxExEnumerator is not freed. Can this be avoided?

This problem applies to Windows XP only and is fixed in Windows Vista and later. It is documented in MSDN. With the current implementation of TComboBoxEx in the VCL this unfortunately cannot be avoided.

When running a project with the ShellBrowser Components in the IDE, I get "Debugger Exception Notification" with the message "Project raised exception class EShellBrowserError"?

This is usually a handled exception, which is only shown in the IDE and not outside the IDE. You can disable messages for handled exceptions in the Delphi menu under "Tools | Debugger Options" on the tab "Language Exceptions" by unchecking the option "Stop on Delphi Exceptions".

Is it possible to control, if the shell context menu is added above or below the Delphi TPopupMenu?

Yes, you can control this behaviour using the ShowContextMenuOnTop property of the visual shell controls.