How to Create Rounded Form

How to Create Rounded Form

procedure TForm1.FormCreate(Sender: TObject);
var
f : HRGN;
begin
Form1.Borderstyle := bsNone;
f := CreateRoundRectRgn(
0, // x-coordinate of the region’s upper-left corner
0, // y-coordinate of the region’s upper-left corner
clientwidth, // x-coordinate of the region’s lower-right corner
clientheight, // y-coordinate of the region’s lower-right corner
40, // height of ellipse for rounded corners
40); // width of ellipse for rounded corners
SetWindowRgn(Handle,f,True);
end;

Download: Source Code

Incoming search terms:

  • createroundrectrgn delphi
  • delphi how to create window with curved corners
  • clientwidth delphi qanleitung
  • how to make a round form from delphi form
  • how to create form in delphi
  • delphi smooth round corners
  • delphi rounded
  • delphi makerounded
  • delphi make rounded
  • delphi form round borders
This entry was posted in Forms. Bookmark the permalink.

One Response to How to Create Rounded Form

  1. Nullified says:

    Hi, thx, can you create an oval shaped form too?

    gr Nullified

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string Y8Nq3k to the field below: