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;

相关阅读 >>

16 位浮点运行 pascal/Delphi

Delphi jpg和bitmap互转转换的方法

Delphi 搜索字符串

Delphi idhttp访问datasnap有密码验证的中间件

Delphi 编写ie代理服务器

Delphi pagecontrol1 另类隐藏页的方法

Delphi idhttp.post超时导致整个线程停止问题解决

Delphi 调用ie隐藏的命令

Delphi dateof、timeof、yearof、monthof、weekof、dayof、hourof、minuteof、secondof、millisecondof �c 提取时间成分

Delphi 判断字符串是否是单词

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



打赏

取消

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

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

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

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

评论

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