{ ajustes no form administrativo }
procedure TfrmSecurity.usrAdminBeforeExecute(
  frmAdministration: TfrmAdministration);
var
  pnlTemp: TPanel;
begin
  LockWindowUpdate(frmAdministration.Handle);

  with frmAdministration do
  begin
    Font.Name := 'Tahoma';
    Font.Size := 8;

    BorderStyle := bsDialog;
    Width := Trunc((Screen.Width * 80) / 100);
    Height := Trunc((Screen.Height * 80) / 100);
    Position := poScreenCenter;
    BorderWidth := 8;

    TSplitter(FindComponent('sptApp')).Visible := False;
    TSplitter(FindComponent('Splitter1')).Visible := False;
    TSplitter(FindComponent('Splitter2')).Width := 8;
    TPanel(FindComponent('pnlApps')).Visible := False;

    with TPanel(FindComponent('Panel2')) do
    begin
      BevelOuter := bvNone;
      Width := 240;
    end;
    with TPanel(FindComponent('pnlObjects')) do
    begin
      Height := 21;
      Color := clBtnFace;
      Font.Color := clDefault;
      Font.Style := Font.Style + [fsBold];
      Font.Size := 8;
      Alignment := taLeftJustify;
    end;
    with TTreeView(FindComponent('tvItems')) do
    begin
      BorderStyle := bsSingle;
//      Color := clWindow;
    end;

    { painel inferior para conter o botão Fechar }
    pnlTemp := TPanel.Create(Self);
    with pnlTemp do
    begin
      Name := 'pnlCtrl';
      Parent := frmAdministration;
      Align := alBottom;
      BevelOuter := bvNone;
      Caption := '';
      Height := 33;
    end;

    { botão Fechar }
    with TButton.Create(Self) do
    begin
      Parent := pnlTemp;
      Caption := 'Fechar';
      ModalResult := mrOk;
      Top := 8;
      Left := frmAdministration.ClientWidth - Width;
    end;
  end;

  LockWindowUpdate(0);
end;

procedure TfrmSecurity.usrAdminShowFrame(Frame: TFrame);
var
  i: Integer;
begin
  LockWindowUpdate(Frame.Handle);

  Frame.Font.Name := 'Tahoma';
  Frame.Font.Size := 8;

  for i := 0 to Frame.ComponentCount - 1 do
    if Frame.Components[i] is TPanel then
      TPanel(Frame.Components[i]).BevelOuter := bvNone;

  if TImage(Frame.FindComponent('Icone')) <> nil then
    with TImage(Frame.FindComponent('Icone')) do
    begin
      Align := alNone;
      Height := 21;
      Width := 0;
    end;

  if TPanel(Frame.FindComponent('pnlCaption')) <> nil then
    with TPanel(Frame.FindComponent('pnlCaption')) do
    begin
      Caption := TrimLeft(Caption);// + ' ' + Frame.ClassName + ' ' + Frame.Name;
      Color := clBtnFace;
      Font.Color := clDefault;
      Font.Style := Font.Style + [fsBold];
      Font.Size := 8;
      Alignment := taLeftJustify;
      Height := 21;
    end;

  if Frame is TfrmList then
    with TfrmList(Frame) do
    begin
      ToolBar.Cursor := crDefault;
      ToolBar.ButtonHeight := 24;
      ToolBar.ButtonWidth := 24;
      ToolBar.Height := 24;
      ToolBar.Images := dtmImages.img16;
      btnNew.ImageIndex := 2;
      btnDelete.ImageIndex := 34;
      btnFirst.ImageIndex := 41;
      btnPrior.ImageIndex := 42;
      btnNext.ImageIndex := 43;
      btnLast.ImageIndex := 44;
      btnPrint.ImageIndex := 16;
      btnDetails.ImageIndex := 10;
      sep01.Visible := False;
      sep02.Visible := False;

      btnLast.SetBounds(0, 0, Toolbar.ButtonWidth, ToolBar.ButtonHeight);
      btnNext.SetBounds(0, 0, Toolbar.ButtonWidth, ToolBar.ButtonHeight);
      btnPrior.SetBounds(0, 0, Toolbar.ButtonWidth, ToolBar.ButtonHeight);
      btnFirst.SetBounds(0, 0, Toolbar.ButtonWidth, ToolBar.ButtonHeight);
    end;

  if Frame is TfrmPermissions then
    with TfrmPermissions(Frame) do
      tvPermissions.RightClickSelect := True;

  LockWindowUpdate(0);
end;


devhost - webhosting para desenvolvedores delphi - isapi/intraweb/asp.net/interbase