procedure TForm4.Button1Click(Sender: TObject); var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(aclBlack, 20); g.DrawLine(p, Button1.Left, Button1.Top + Button1.Height + 50, Button1.Left + Button1.Width, Button1.Top + Button1.Height + 50); g.Free; p.Free; end;