Your full service technology partner! 
-Collapse +Expand
Search Delphi Group:

-Collapse +Expand Delphi To/From
-Collapse +Expand Delphi Store

Prestwood eMagazine

May Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi News / Other Topic   Print This     

Tip: Create Round Windows

Tip: Create Round Windows in Delphi News / Other topic (part of our Pascal and Delphi Coding group).

Quick Search: Windows   Tip Create   Tip Create Round  
Larry J. Rutledge
Prestwood IT
Citrus Heights, CA USA
Version Info: Works with Delphi 2 and higher

Category: Multimedia

Use SetWindowRgn API call to make a round form.

The SetWindowRgn function sets the window region of a window. The window region determines the area within the window where the operating system permits drawing. The operating system does not display any portion of a window that lies outside of the window region.

Simply use this function in the FormCreate event:

procedure TForm.FormCreate(Sender: TObject);

R1 := CreateEllipticRgn(1, -1, Width - 1, Height);
R2 := CreateEllipticRgn(50, 50, Width - 50, Height - 50);
CombineRgn(R2, R1, R2, RGN_XOR);
SetWindowRgn(Handle, R2, True);

Larry J. Rutledge

Programmer / Analyst
Prestwood Software & Consulting
7525 Auburn Blvd., #8
Citrus Heights, CA 95610

Old UBB Archived Link: [URL=][/URL]

[This message has been edited by Larry Rutledge (edited November 30, 2000).]
Larry J. Rutledge


Prestwood Software
 Posted 22 years ago (Thread Starter)
Comment Quote
About Larry J. Rutledge -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Larry J. Rutledge
I worked for Prestwood Software as a Delphi developer from 1997 through 2002. During that time I enjoyed working with Mike Prestwood and the other developers at Prestwood.

Post ID #168, 1 replies
Thread Started 11/27/2000 10:08:00 AM
View Counter=3412
Last Reply Posted 4/24/2008 5:22:15 PM)
Location=Citrus Heights, CA USA 
Joined=22 years ago   MB Posts=73   KB Posts=9  
Most Recent Post
-- USA

Thanks Larry.

Paul "The Coder" Santoro

 Posted 14 years ago
Comment Quote
About ParaDelphi -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About ParaDelphi

Paul has been developing in paradox and delphi since the mid 90s.

Post ID #12705 (Level 1.1)  Reply to 168
Thread Started 4/24/2008 5:22:15 PM
Location=-- USA 
Joined=15 years ago   MB Posts=23   KB Comments=2  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1232A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #168 Counter
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

©1995-2022 Prestwood IT Solutions.   [Security & Privacy]