В чем ошибка? Почему при запуске ничего не происходит? Только высвечивается исходная форма с исходными же размерами.
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub UserForm1_Initialize()
Dim FullRgn As Long
Dim hwdn As Long
FullRgn = CreateRectRgn(0, 0, 40, 40)
hwdn = FindWindow("ThunderDFrame", Me.Caption)
SetWindowRgn hWnd, FullRgn, True
End Sub