|
Membuat
rounded form
Secara default form yang Anda buat akan berbentuk
segi empat. Dengan menambahkan beberapa baris
kode berikut Anda dapat membuat form berbentuk
elips atau lingkaran.
procedure
TForm1.FormCreate(Sender: TObject);
var
region : HRgn;
begin
region := CreateEllipticRgn(1,1,200,200);
SetWindowRgn(handle,
region, true);
end;
Jika Anda
membuka referensi Windows API tentang function
CreateEllipticRgn
maka
akan didapat keterangan seperti di bawah ini:
HRGN CreateEllipticRgn(
int nLeftRect,
// x-coordinate of the upper-left corner
of the bounding rectangle
int nTopRect, // y-coordinate of
the upper-left corner of the bounding rectangle
int nRightRect, // x-coordinate
of the lower-right corner of the bounding rectangle
int nBottomRect // y-coordinate
of the lower-right corner of the bounding rectangle
);
|