delphi 创建圆形或椭圆形窗体
delphi吧
全部回复
仅看楼主
level 13
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;
2012年11月23日 02点11分 1
level 11
函数内容是什么?
2015年10月28日 02点10分 2
1