Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" _
(ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
'et rajouter dans l'userform_inialize
Private Sub UserForm_Initialize()
Dim hwnd As Long, exLong As Long, zFactor As Integer
hwnd = FindWindowA(vbNullString, Me.Caption)
exLong = GetWindowLongA(hwnd, -16)
If exLong And &H880000 Then SetWindowLongA hwnd, -16, exLong And &HFF77FFFF
zFactor = 100 * CInt(Application.Width / Me.Width)
If zFactor > 400 Then zFactor = 400
Me.Width = Application.Width
Me.Height = Application.Height
Me.Zoom = zFactor