...make a Hole in a form?

Author: progtecnic

Category: VCL

procedure TForm1.Button1Click(Sender: TObject);
var
  
region1, region2: hrgn;
begin
  
region1 := CreateRectRgn(0, 0, Width, Height);
  region2 := CreateEllipticRgn(30, 30, 200, 200);
  CombineRgn(region1, region1, region2, RGN_DIFF);
  SetWindowRgn(Handle, region1, True);
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base