Recent Posts

Selamat datang di Coding Delphi Land Weblog kumpulan source code pemogram delphi

(Bukan maksud untuk menggurui tetapi marilah kita berbagi ilmu tuk perkembangan kemajuan teknologi kita

Selasa, 17 November 2009

Draw Polygon in Form

Type
PtsType = array [0..15, 0..1] of Integer;

const
Pts: PtsType = ((0, 0), (800, 0), (800, 600),
(200, 600), (200, 220), (300, 280),
(265, 205), (350, 117), (205, 170),
(120, 90), (130, 200), (60, 350), (200, 220),
(200, 600), (0, 600), (0, 0));

procedure TForm1.Button1Click(Sender: TObject);
var
HRegion1: THandle;
begin
HRegion1 := CreatePolygonRgn(Pts, SizeOf(Pts) div 8, alternate);
SetWindowRgn(Handle, HRegion1, True);
end;

0 komentar:

Posting Komentar