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;

相关阅读 >>

Delphi 批量日期格式化

Delphi windows 底下根据一个进程的名字杀死一个进程的代码

什么是嵌入式数据库

Delphi 网上获取北京时间xmlhttprequest如何访问需要安全验证的网站

Delphi xe 利用fmx控件的makescreenshot过程实现wait效果

Delphi 字符串适宽处理

Delphi中对url进行编码和解码

Delphi access技巧集

Delphi 用 superobject 解析淘宝上的 json 数据

Delphi 采用 tidhttp 访问 https 的网站,采用 tidtcpclient 访问 https 的网站

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



打赏

取消

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

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

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

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

评论

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

    正在狠努力加载,请稍候...