uses Winapi.GDIPAPI, Winapi.GDIPOBJ{, Winapi.GDIPUTIL}; procedure TForm1.FormPaint(Sender: TObject); var graphics: TGPGraphics; pen: TGPPen; begin graphics := TGPGraphics.Create(Canvas.Handle); pen := TGPPen.Create(MakeColor(255,0,0)); graphics.DrawRectangle(pen, MakeRect(11, 22, 33, 44)); pen.Free; graphics.Free; end;
http://www.cnblogs.com/del/category/113557.html