CUSTOM WINDOW CORNERS

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!!!
LAME-ERAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
nffvrxqgrcfqvvcCommented:
0
 
LAME-ERAuthor Commented:
Thanks ryancys! The links really helped me, although I took my a while to create kind of a "mask" for my form...
0
All Courses

From novice to tech pro — start learning today.