谢谢了

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs;type
      TForm1 = class(TForm)
      private
        { Private declarations }
      public
        procedure WMNCPAint(var Mes : TWMNCPaint); message WM_NCPAINT;
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.WMNCPAint(var Mes: TWMNCPaint);
    var
      ACanvas : TCanvas;
    begin
      ACanvas := TCanvas.Create;
      try
        ACanvas.Handle := GetWindowDC(Form1.Handle);
        with ACanvas do begin
          Brush.Color := clActiveCaption;
          Font.Name := 'Times New Roman';
          Font.Size := 10;
          Font.Color := clRed;
          Font.Style := [fsItalic, fsBold];
          TextOut(GetSystemMetrics(SM_CYMENU) + GetSystemMetrics(SM_CXBORDER),
                  Round((GetSystemMetrics(SM_CYCAPTION) - Abs(Font.Height))/2) +1,
                  ' Your title here!');
        end;
      finally
        ReleaseDC(Form1.Handle, ACanvas.Handle);
        ACanvas.Free;
      end;
    end;end.