Option Explicit
Dim Rgn 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 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 Sub Form_Load()
Rgn = CreateRoundRectRgn(0, 0, 200, 200, 15, 15)
SetWindowRgn Me.hWnd, Rgn, True
End Sub
Private Sub Form_Unload(Cancel As Integer)
DeleteObject Rgn
End Sub
Dim Rgn 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 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 Sub Form_Load()
Rgn = CreateRoundRectRgn(0, 0, 200, 200, 15, 15)
SetWindowRgn Me.hWnd, Rgn, True
End Sub
Private Sub Form_Unload(Cancel As Integer)
DeleteObject Rgn
End Sub