Dim OldH As Long
Dim OldW As Long
Private Sub UserForm_Activate()
trois_boutons
OldH = Me.Height
OldW = Me.Width
End Sub
Private Sub trois_boutons()
Dim hwnd&
hwnd = ExecuteExcel4Macro("CALL(""user32"",""GetActiveWindow"",""JCC"")") 'api GetActiveWindow
ExecuteExcel4Macro ("CALL(""user32"",""SetWindowLongA"",""JJJJJ""," & hwnd & ", " & -16 & ", " & &H94CF0080 & ")") 'api SetWindowLongA
End Sub
Private Sub UserForm_Resize()
Dim LzooM&
LzooM = Application.Min(100 * (Me.Width / OldW), 100 * (Me.Height / OldH))
Me.Zoom = Application.Min(LzooM, 400)
Me.Repaint
End Sub