Vai dar um pouco de trabalho...mas tbm ja fiz esta pergunta quando vi o 
emule....

esta faltando somente um user q não indedifiquei....

caso arrume ela gente me de um toque


//declare assim na seção private
procedure WMNCPaint (Var Msg : TWMNCActivate); messafe WM_NCACTIVATE;

// captura o paint
procedure TForm1.WMNCPaint(var Msg : TWMNCPaint); 
begin
   inherited;
   DrawCaptButton;
end;

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, ShellAPI, Buttons;

type
  TFerramenta = (FrLinha, FrRetangulo, FrElipse, FrRetRedondo);
  TForm1 = class(TForm)
  procedure DrawCaptButton;
  private
    { Private declarations }
    procedure WMNCPaint (Var Msg : TWMNCActivate); message WM_NCACTIVATE;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses DateUtils;

{$R *.dfm}

// captura o evento
procedure TForm1.WMNCPaint (Var Msg : TWMNCActivate);
begin
   inherited;
   DrawCaptButton;
end;

procedure TForm1.DrawCaptButton;
var 
   XFrame, Yframe, xSize, YSize : Integer;
   R : TRect;
begin
  // pegam as dimensões do from (sizeable)
  XFrame := GetSystemMetrics(SM_CXFRAME);
  YFrame := GetSystemMetrics(SM_CYFRAME);
  // pegam as dimesões do botão
  xSize := GetSystemMetrics(SM_CXSIZE);
  ySize := GetSystemMetrics(SM_CYSIZE);
  // define a posição
  CaptionBtn := Bounds(width - XFrame - 4 * xSize + 2, Yframe + 2, Xsize - 2, 
Ysize - 4);

  Canvas.Handle := GetWindowsDC(self.Handle);
  Canvas.Font.Name := 'Arial';
  Canvas.Font.Style := [fsBold];
  Canvas.Pen.Color := clYellow;
  Canvas.Brush.Color := clBtnFace;
  try
    DrawButtonFace(Canvas, captionBtn, 1, bsAutoDetect, False, False, False);
    R := Bounds(Width - XFrame - 4 * xSize + 2, Yframe + 3, xSize - 6, YSize - 
7);
    With CaptionBtn do
      Canvas.TextRect(R, R.Left + 2, R.Top - 1, 'FC');
  finally
    ReleaseDC(Self.Handle, Canvas.Handle);
    Canvas.Handle := 0;
  end;
end;

end.

  ----- Original Message ----- 
  From: Thiago Filiano (America Soft) 
  To: delphi-br@yahoogrupos.com.br 
  Sent: Thursday, March 08, 2007 4:55 PM
  Subject: [delphi-br] botao adicional na barra de titulo - como??


  Boa tarde pessial,

  alguém tem uma dica ai, de como colocar um botãozinho.. ou ícone, 
  semelhante ao Maximizar, minimizar.. na barra de título??

  Obrigado!

  Thiago


   

[As partes desta mensagem que não continham texto foram removidas]

Responder a