PaintBox1
![](https://images.cnblogs.com/cnblogs_com/xe2011/201207/201207161605594282.png)
![](https://images.cnblogs.com/cnblogs_com/xe2011/201207/201207161606011542.png)
void __fastcall TForm1::Button1Click(TObject *Sender)
{
PaintBox1->Canvas->Brush->Color = clRed;
PaintBox1->Canvas->FillRect(PaintBox1->Canvas->ClipRect);
PaintBox1->Canvas->Ellipse(0,0,100,100);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::PaintBox1Paint(TObject *Sender)
{
PaintBox1->Canvas->Brush->Color = clBlue;
PaintBox1->Canvas->Ellipse(0,0,100,100);
}