ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellBrowser.TShellBrowser.GetDesktopIconIndex

Use GetDesktopIconIndex to get the number of the desktop icon.

Syntax
Pascal
function GetDesktopIconIndex: Integer;

The icon index of the Desktop itself.

GetDesktopIconIndex returns the number of the desktop icon in the system image list. Use the component TJamSystemImageList to get access to the image list of Windows.

Adding the desktop as root to a TreeView:

var Node: TTreeNode;
begin
  Node := TreeView.Items.Add(nil, ShellBrowser.GetDesktopName);
  Node.ImageIndex := ShellBrowser.GetDesktopIconIndex;
  Node.SelectedIndex := ShellBrowser.GetDesktopIconIndex;
end;