Pour avoir les boutons réduire et agrandir dans un userform coller dans un module standard du userform
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 GWL_STYLE As Long = (-16) 'The offset of a window's style
Private hWnd, IStyle
Public Sub toto(F As Object)
hWnd = FindWindow(vbNullString, F.Caption)
IStyle = GetWindowLong(hWnd, GWL_STYLE) Or &H70000
SetWindowLong hWnd, GWL_STYLE, IStyle
End Sub
puis Coller toto me
dans private sub userform_inizialize