Pesquisar no conteúdo do

sábado, 25 de maio de 2013

DELPHI - Shell Tree View - Delphi XE, XE2, XE3, XE4...


Segue link de instruções para a instalação da BPL:

Pagina da Embarcadero:

VCL.ShellControls Sample


These samples demonstrate how to create components that use the Windows Shell API.




You can find the ShellControls sample project at:


This application creates and installs components that display the folder hierarchy with a specified root.
The created visual components allow viewing the folder hierarchy as a tree, a combo box, or a list. The components can be mapped one to another so the actions are synchronized.
A sample form is created to exemplify how to use the shell controls. The form contains a combo box view, a tree view, and a list view of the folder hierarchy, all of them being linked together. There are also buttons to control how the items are displayed: sorted, with small or large icons, as a simple list, or as a detailed list (report).

How to Use the Sample

  1. Navigate to Start > Programs > Embarcadero RAD Studio > Samples and open ShellControls.dproj.
  2. Load ShellControls.groupproj.
  3. Build bcbshlctrls.bpl.
  4. Build and install dclshlctrls.bpl.
  5. Run shelldemo.exe.


File Contains
ShellConsts The string constants used in the application.
ShellCtrls The classes for all the visual and nonvisual components.
ShellReg Implementation for the register method. Registers the components, property, and component editors.
RootEdit The form displayed at design time to change the root folder for a shell component.
ShellDemo A sample form that implements a file manager.


  • TShellFolder handles data for a folder, like the full path, details, level, subfolders, parent, and so on.
  • TShellChangeThread represents the thread used by the notifier.
  • TShellChangeNotifier represents the notifier class.
  • TShellTreeView is the class for the visual component that displays the folder hierarchy as a tree.
  • TShellComboBox is the class for the visual component that displays the folder hierarchy as a combo box.
  • TShellListView is class for the visual component that displays the folder hierarchy as a list.
  • TRootPathEditDlg represents the component editor for the visual shell components. This form is displayed at design time and it allows the user to choose a root directory for the shell views.


To store folder attributes and properties, Win32 API Shell interfaces from the ShlObj unit are used: IShellDetails, IShellForlder, IShellFolder2.


See Also

segunda-feira, 20 de maio de 2013

DELPHI - Delphi Tour Multi Device - Apresentação do Delphi XE4


Delphi Tour Multi Device - Apresentação do Delphi XE4

Aplicações nativas para iOS / Windows


quinta-feira, 2 de maio de 2013

DELPHI - Escolhendo Impressora padrão para impressão - Set Default Printer


//Declarar unit: Printers

//Pegar Impressora pelo nome da impressora:
iP : Integer;
  iP := Printer.Printers.IndexOf('LX300');
  if iP >= 0 then
    Printer.PrinterIndex := iP;
// Pegar nomes das impressoras instaladas no computador local
function PrintersNames: TStringList;
  Printer: TPrinter;
    Result  := TStringList.Create;
    Result.Text := Printer.Printers.Text;

Max Gehringer