Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongW" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongW" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const GWL_STYLE As Long = -16
Private Const WS_THICKFRAME As Long = &H40000
Private Const WS_SIZEBOX As Long = WS_THICKFRAME
Private hFrm&, OldStyle&
Private Sub UserForm_Initialize()
hFrm = FindWindow("ThunderDFrame", Me.Caption)
OldStyle = GetWindowLong(hFrm, GWL_STYLE)
Call SetWindowLong(hFrm, GWL_STYLE, OldStyle Or WS_SIZEBOX)
End Sub
Private Sub UserForm_Terminate()
Call SetWindowLong(hFrm, GWL_STYLE, OldStyle)
End Sub