窗体上打个矩形的洞
2020-12-13 05:38
标签:style blog http color io for 2014 div procedure TForm1.FormCreate(Sender: TObject); 窗体上打个矩形的洞,搜素材,soscw.com 窗体上打个矩形的洞 标签:style blog http color io for 2014 div 原文地址:http://www.cnblogs.com/xe2011/p/3875862.html
var
Rgn1, Rgn2: HRGN;
begin
Rgn1 := CreateRectRgn(0,0, Form.Width, Form.Height);
Rgn2 := CreateRectRgn(Ctrl.Left, Ctrl.Top,Ctrl.Left+ Ctrl.Width,Ctrl.Top+ Ctrl.Height);
CombineRgn(Rgn1, Rgn1, Rgn2, RGN_DIFF);
SetWindowRgn(Form.Handle, Rgn1, TRUE);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
MakeRectHole(Panel1,Form1);
end;
begin
BorderStyle:=BsNone;
WindowState:= wsMaximized;
end;
begin
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) xor WS_CAPTION);
Height := ClientHeight;
end;
上一篇:后缀数组入门