No hay una forma sencilla de hacer esto ya que debes ser tú mismo quien se encargue de dibujar todo el título si quieres que se haga de forma distinta al estándar.
El código que te pongo a continuación puede servirte aunque posiblemente sólo funcione con ventanas con borde bsSizeable. Para otros casos tendrás que calcular la posición correcta del título.
Código Delphi
[-]
type
TForm1 = class(TForm)
private
procedure WMNCPaint(var Msg: TWMNCPaint); message WM_NCPAINT;
procedure WMNCActivate(var Msg: TWMNCActivate); message WM_NCACTIVATE;
public
procedure PaintCaption;
end;
implementation
procedure TForm1.WMNCActivate(var Msg: TWMNCActivate);
begin
inherited;
PaintCaption; end;
procedure TForm1.WMNCPaint(var Msg: TWMNCPaint);
begin
inherited;
PaintCaption; end;
procedure TForm1.PaintCaption;
var
NewCaption: String;
ncCanvas: TCanvas;
cxSmIcon: Integer;
cxSizeFrame: Integer;
cySizeFrame: Integer;
cyCaption: Integer;
cyText: Integer;
begin
NewCaption := 'Foros del Club Delphi';
ncCanvas := TCanvas.Create;
try
ncCanvas.Handle := GetWindowDC(Handle);
with ncCanvas do
begin
Brush.Style := bsClear;
Font.Name := 'Comic Sans MS';
Font.Size := 8;
Font.Color := clYellow;
Font.Style := [fsBold];
cxSmIcon := GetSystemMetrics(SM_CXSMICON);
cxSizeFrame := GetSystemMetrics(SM_CXSIZEFRAME);
cySizeFrame := GetSystemMetrics(SM_CYSIZEFRAME);
cyCaption := GetSystemMetrics(SM_CYCAPTION);
cyText := TextHeight(NewCaption);
TextOut(cxSizeFrame + cxSmIcon + 4, cySizeFrame + ((cyCaption - cyText) div 2) - 1, NewCaption);
end;
finally
ReleaseDC(Handle, ncCanvas.Handle);
ncCanvas.Free;
end;
end;
Para que funcione bien deberás borrar la propiedad Caption del formulario.
// Saludos