I've rounded the corners on my form using this code..
Declare this lot:
Code:
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 Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Paste these into your form, the first one's for allowing the form to be moved by clicking anywhere on its surface, and the second you need to delete your shaped form region when the form unloads.
Code:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ReleaseCapture
SendMessage Me.hWnd, &HA1, 2, 0&
End Sub
Private Sub Form_Unload(Cancel As Integer)
DeleteObject ResultRegion
End Sub
This last bit is setting the region, yDim and xDim are the pixels sizes of your form and rDim is the radius of your rounded corner.
Code:
Private Sub Form_Load()
Dim nRet As Long
nRet = SetWindowRgn(Me.hWnd, CreateRoundRectRgn(0, 0, xDim, yDim, 18, 18), True)
End Sub
This is just for 'rounded' forms of course, if you want to learn about the others then you'll have to read a tutorial or something...
Mafro