2005-01-22 10:31:11 PM delphi43
How do I draw a simple line or circle on a form? In Visual Basic it was
done with a "pen" object...what is the equivalent in Delphi 6?
thanks
Simon
Delphi Developer
2005-01-22 11:02:10 PM
Re:drawing lines and circles
At it is simplest, implment a FormPaint handler:
procedure TForm1.FormPaint(Sender: TObject);
begin
Canvas.Brush.Color := clWhite;
Canvas.Pen.Color := clBlack;
Canvas.Ellipse(ClientRect);
Canvas.MoveTo(ClientWidth div 2, 0);
Canvas.LineTo(0, 0);
end;