(Gast)
n/a Beiträge
|
Re: Ecken abrunden?
7. Dez 2006, 15:11
Beispiel:
Delphi-Quellcode:
procedure MakeRounded(Control: TWinControl);
var
R: TRect;
Rgn: HRGN;
begin
with Control do
begin
R := ClientRect;
rgn := CreateRoundRectRgn(R.Left, R.Top, R.Right, R.Bottom, 20, 20);
Perform(EM_GETRECT, 0, lParam(@r));
InflateRect(r, - 5, - 5);
Perform(EM_SETRECTNP, 0, lParam(@r));
SetWindowRgn( Handle, rgn, True);
Invalidate;
end;
end;
|
|
Zitat
|