delphi 创建圆形或椭圆形窗体


本文整理自网络,侵删。

 delphi 创建圆形或椭圆形窗体主要使用以下两个函数

// The CreateEllipticRgn function creates an elliptical region.
function CreateEllipticRgn(
nLeftRect: Integer, // x-coordinate of the upper-left corner
nTopRect: Integer, // y-coordinate of the upper-left corner
nRightRect: Integer, // x-coordinate of the lower-right
nBottomRect: Integer // y-coordinate of the lower-right corner
): HRGN;
// The SetWindowRgn function sets the window region of a window.
function SetWindowRgn(
hWnd: HWND, // handle to window whose window region is to be set
hRgn: HRGN, // handle to region
bRedraw: Boolean // window redraw flag
);
使用方法:


procedure TForm1.FormCreate(Sender: TObject);
var
hRegion: HRGN;
begin
BorderStyle := bsNone;
hRegion := CreateEllipticRgn(1, 1, 200, 200);
SetWindowRgn(Handle, hRegion, True);
end;

相关阅读 >>

获取 ip138 ip 地址

Delphi 跟随鼠标位置点击弹出菜单

Delphi image1 图像旋转90

Delphi 复制拷贝文件目录函数

Delphi try abort、exit except 、finally end 执行情况

Delphi 释放资源文件

Delphi xe8安卓下汉字转gb2312 urlencode代码

Delphi 通过 arp 协议获取局域网内指定 ip 地址的机器的 mac 地址

Delphi ticon保存ico文件时失真的解决办法

Delphi ip地址转换

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...