Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
Private Sub MakeRoundRect(ctl As Control, rx&, ry&)
On Error Resume Next
Dim r1 As Long
With ctl
r1 = CreateRoundRectRgn(0, 0, .Width, .Height, rx, ry)
SetWindowRgn .hwnd, r1, True
End With
DeleteObject r1
End Sub