Posted on 2005-03-27
Medium Priority
Last Modified: 2012-05-05
I have this code:

Sub RoundBorder(TheForm As Form)
With TheForm

thematrix = CreateRectRgn(0, 0, .ScaleWidth, .ScaleHeight)
notthematrix = CreateRectRgn(0, 0, .ScaleWidth, .ScaleHeight)

a = CreateRectRgn(10, 0, .ScaleWidth - 10, .ScaleHeight)
B = CreateRectRgn(0, 10, .ScaleWidth, .ScaleHeight - 10)

 c = CreateEllipticRgn(0, 0, 20, 20)
 d = CreateEllipticRgn(0, .ScaleHeight, 20, .ScaleHeight - 20)
 e = CreateEllipticRgn(.ScaleWidth, 0, .ScaleWidth - 20, 20)
 f = CreateEllipticRgn(.ScaleWidth, .ScaleHeight, .ScaleWidth - 20, .ScaleHeight - 20)

G = CombineRgn(thematrix, thematrix, a, 4)
G = CombineRgn(thematrix, thematrix, B, 4)
G = CombineRgn(thematrix, thematrix, c, 4)
G = CombineRgn(thematrix, thematrix, d, 4)
G = CombineRgn(thematrix, thematrix, e, 4)
G = CombineRgn(thematrix, thematrix, f, 4)
G = CombineRgn(thematrix, notthematrix, thematrix, 4)

m = SetWindowRgn(.hWnd, thematrix, True)
DeleteObject thematrix
DeleteObject notthematrix
DeleteObject a
DeleteObject B
DeleteObject c
DeleteObject d
DeleteObject e
DeleteObject f
DeleteObject G
DeleteObject m

End With
End Sub

... This makes the corners in my form round. The problem is that I want to leave the bottom corners like they are and make the top corners even rounder, EXACTLY like so -> http://www.rotax.dap.ro/corner.jpg . I didn't understand much of the code above so I don't know what exactly to modify in order to obtain the corner in the image. PLEASE HELP!!!
Question by:LAME-ER
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 53

Accepted Solution

Ryan Chong earned 2000 total points
ID: 13638768
LVL 29

Expert Comment

ID: 13639496

Author Comment

ID: 13643747
Thanks ryancys! The links really helped me, although I took my a while to create kind of a "mask" for my form...

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question