unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormResize(Sender: TObject);
    procedure FormPaint(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.nfm}

procedure TForm1.FormPaint(Sender: TObject);
const s :String ='Helion';
var x,y :Integer;
begin
with Canvas.Font do
  begin
  Color:=clNavy;
  Name:='Times New Roman';
  Size:=32;
  end;
x:=(ClientWidth-Canvas.TextWidth(s)) div 2;
y:=(ClientHeight-Canvas.TextHeight(s)) div 2;
Canvas.TextOut(x,y,s);
end;

procedure TForm1.FormResize(Sender: TObject);
begin
Refresh;
end;

end.
