He encontrado este código que me vendría muy bien pero no consigo hacerlo funcionar. ¿Seríais tan amables de decirme por qué no funciona?
Código Delphi
[-]
type
TShape = class(ExtCtrls.TShape);
TForm1 = class(TForm)
Shape1: TShape;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Shape1.Canvas.Font.Name :='Arial'; Shape1.Canvas.Font.Size :=20; Shape1.Canvas.Font.Color:=clBlue; Shape1.Canvas.TextOut(10,10,'1999');
end;
Gracias
bulc