procedure TForm1.Button1Click(Sender: TObject);
const
x1 = 10;
y1 = 10;
x2 = 300;
y2 = 200;
x3 = 90;
y3 = 90;
begin
SetWindowRgn(handle,CreateRoundRectRgn(0,0,Width,Height, 50, 50),True);
RoundRect(Canvas.Handle, x1,y1, x2,y2, x3,y3);
end;
const
x1 = 10;
y1 = 10;
x2 = 300;
y2 = 200;
x3 = 90;
y3 = 90;
begin
SetWindowRgn(handle,CreateRoundRectRgn(0,0,Width,Height, 50, 50),True);
RoundRect(Canvas.Handle, x1,y1, x2,y2, x3,y3);
end;
本文介绍了一种使用程序代码在窗口中绘制圆角矩形的方法。通过设定窗口区域和调用绘图函数,实现了特定尺寸和位置的圆角矩形显示。此方法适用于需要自定义界面元素的应用程序。
6905

被折叠的 条评论
为什么被折叠?



