Form Transparan

24 04 2010

Tip kali ini akan membuat tampilan form Anda transparan. Tuliskan listing program dibawah ini pada event onCreate milik Form.

procedure TForm1.FormCreate(Sender: TObject);
var
  FullRgn, ClientRgn: 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);
  SetWindowRgn(Handle, FullRgn, True);
end;

Selamat Mencoba..


Aksi

Information

One response

24 04 2010

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: