//www.dronymc.cjb.net
//drony@mynet.com
//icq:266148308
procedure TForm1.Button1Click(Sender: TObject);
var
aHWnd : hWnd;
Region1,
Region2 : hRgn;
a : TRect;
begin
aHWnd := FindWindow(nil, 'Notepad');
Getwindowrect(aHwnd,a);
Region1 := CreateRectRgn(0, 0, a.right - a.left, a.bottom - a.top);
Region2 := CreateEllipticRgn(0 , 0, 100, 100);
CombineRgn(Region1,Region1,Region2,RGN_DIFF);
SetWindowRgn(aHWnd, Region1, True );
end;