标签:style blog http color io for 2014 div
procedure MakeRectHole(Ctrl:TWinControl;Form:TForm);
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;
procedure TForm1.FormCreate(Sender: TObject);
begin
BorderStyle:=BsNone;
WindowState:= wsMaximized;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) xor WS_CAPTION);
Height := ClientHeight;
end;
标签:style blog http color io for 2014 div
原文地址:http://www.cnblogs.com/xe2011/p/3875862.html