procedure TForm1.FormCreate(Sender: TObject); begin pb := TPaintBox.Create(Self); pb.Parent := Self; end;
procedure TForm1.Button1Click(Sender: TObject); begin pb.Canvas.Pen.Color := clBlue; pb.Canvas.Brush.Color := clRed; pb.Canvas.Rectangle(0,0,50,50); end;
|
请发表评论