eaew pessoal tudo na boa ?
como ensinar hoje aki 2 forma de deixar seu form legal ok vamos laa
1º form eliptico
No evento OnCreate do Form, coloque:
procedure TForm1.FormCreate(Sender: TObject);
var
hR : THandle;
begin
hR := CreateEllipticRgn (0,0,Width,Height);
SetWindowRgn (Handle,hR,True);
end;
Aconselho a usar BorderStyle em bsNone.
2º Form retangular com bordas redondas :
Va no Evento OnCretate e coloque o seguinte code :
procedure RoundMyWindow(Window,WidthEllipse,HeightEllipse : Integer);
var
wRect : TRect;
wRgn : DWORD;
begin
GetWindowRect(Window,wRect);
wRgn := CreateRoundRectRgn(0,0,(wRect.Right-wRect.Left),
(wRect.Bottom-wRect.Top),WidthEllipse,HeightEllipse);
SetWindowRgn(Window,wRgn,True);
DeleteObject(wRgn);
end;
button :
roundMyWindow(Handle,20,20);
creditos : noob
como ensinar hoje aki 2 forma de deixar seu form legal ok vamos laa
1º form eliptico
No evento OnCreate do Form, coloque:
procedure TForm1.FormCreate(Sender: TObject);
var
hR : THandle;
begin
hR := CreateEllipticRgn (0,0,Width,Height);
SetWindowRgn (Handle,hR,True);
end;
Aconselho a usar BorderStyle em bsNone.
2º Form retangular com bordas redondas :
Va no Evento OnCretate e coloque o seguinte code :
procedure RoundMyWindow(Window,WidthEllipse,HeightEllipse : Integer);
var
wRect : TRect;
wRgn : DWORD;
begin
GetWindowRect(Window,wRect);
wRgn := CreateRoundRectRgn(0,0,(wRect.Right-wRect.Left),
(wRect.Bottom-wRect.Top),WidthEllipse,HeightEllipse);
SetWindowRgn(Window,wRgn,True);
DeleteObject(wRgn);
end;
button :
roundMyWindow(Handle,20,20);
creditos : noob