Botón max. Y min. En userform
Estimado expertos:
Encontré la siguiente rutina para agregar le botón maximizar y minimizar pero sale un error en la segunda linea específicamente en FindWindow no se ha definido Sub o Funtion
Dim lngMyHandle As Long, lngCurrentStyle As Long, lngNewStyle As Long
lngMyHandle = FindWindow("THUNDERDFRAME", Me.Caption)
lngCurrentStyle = GetWindowLong(lngMyHandle, GWL_STYLE)
lngNewStyle = lngCurrentStyle Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX
SetWindowLong lngMyHandle, GWL_STYLE, lngNewStyle
Esto va acompañado de un modulo en donde hay :
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Const WS_MINIMIZEBOX As Long = &H20000
Private Const WS_MAXIMIZEBOX As Long = &H10000
Private Const GWL_STYLE As Long = (-16)
Gracias!