Form Transparan

procedure TForm1.FormCreate(Sender: TObject);
var
fullRGN,ClientRGN,buttonRGN : Thandle;
margin,x,y : integer;
begin
margin :=(width-ClientWidth)div 2;
fullrgn :=CreateRectRgn(0,0,width,height);
x:=margin;
y:=height-clientheight-margin;
ClientRGN:=CreateRectRgn(x,y,x+clientwidth,y+clientheight);
CombineRgn(fullRGN,fullRGN,ClientRGN,RGN_DIFF);
x:=x+Button1.Left;
y:=y+Button1.Top;
buttonRGN:=CreateRectRgn(x,y,x+button1.Width,y+Button1.Height);
CombineRgn(fullRGN,fullRGN,buttonRGN,RGN_OR);
SetWindowRgn(Handle,fullRGN,true);
end;

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: