Analitcs

Pesquisar no conteúdo do blog.atlabs.com.br

sábado, 25 de maio de 2013

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

Reações: 

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

http://docwiki.embarcadero.com/CodeExamples/XE2/en/VCL.ShellControls_Sample


Pagina da Embarcadero:


VCL.ShellControls Sample

Language:

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

Contents

 [hide

Location

You can find the ShellControls sample project at:

Description

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.

Files

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.

Classes

  • 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.

Implementation

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

Uses

See Also

segunda-feira, 20 de maio de 2013

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

Reações: 

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


Aplicações nativas para iOS / Windows


Inscreva-se!

http://www.embarcaderobr.com.br/tour/edm/invite_SP.html



quinta-feira, 2 de maio de 2013

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

Reações: 

//Declarar unit: Printers

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

Max Gehringer