Registriert seit: 15. Nov 2003
Ort: Berlin
946 Beiträge
Delphi 10.2 Tokyo Professional
|
Re: Benötige Hilfe beim Entwickeln einer Komponente
7. Sep 2007, 15:46
Hi,
reicht das hier:
Delphi-Quellcode:
procedure TmyPanel.Paint;
var
R : TRect;
Region : hRgn;
begin
R := GetClientRect;
with Canvas do
begin
Pen.Color := FBorderColor;
Region := CreateRoundRectRgn(0, 0, R.Right, R.Bottom, 20, 20);
FrameRgn(Canvas.Handle, Region, Canvas.Pen.Handle, R.Right, R.Bottom);
SetWindowRgn( Handle, Region, True);
DeleteObject(Region);
Region := CreateRoundRectRgn(FBorderWidth, FBorderWidth, R.Right - FBorderWidth, R.Bottom - FBorderWidth, 20, 20);
FillRgn(Canvas.Handle, Region, Canvas.Brush.Handle);
SetWindowRgn( Handle, Region, True);
DeleteObject(Region);
end;
end;
Gruß
|
|
Zitat
|