Zitat von
Borland:
Delphi-Quellcode:
procedure Form1.Button1Click(Sender: TObject);
var
MyRgn: HRGN ;
begin
MyRgn := CreateRectRgn(100,100,200,200);
SelectClipRgn(Image1.Canvas.Handle,MyRgn);
Image1.Canvas.Brush.Color := clRed;
Image1.Canvas.FillRect(Image1.Canvas.ClipRect);
Image1.Invalidate;
SelectClipRgn(Image1.Canvas.Handle,nil);
DeleteObject(MyRgn);
end;
Freundliche Grüße vom marabu