Bonjour,
j'ai trouvé sur ce forum le moyen d'afficher les boutons Agrandir et Réduire sur un 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.
Mais comment les faire disparaître ensuite ?
D'avance merci pour votre aide.