Headlines News :

Misteri

Home » , » CARA MEMBUAT ROUNDED FORM ( HOW TO MAKE A FORM ROUNDED )

CARA MEMBUAT ROUNDED FORM ( HOW TO MAKE A FORM ROUNDED )

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
);


Share this article :
 
Support : Creating Website | Johny Template | Mas Template
Proudly powered by Blogger
Copyright © 2011. WEBDETIK - All Rights Reserved
Template Design by Creating Website Published by Mas Template