Private Sub UserForm_Initialize()
Dim Ecadre#, WsTate&, NewLarge#, NewHaut#, Mem, Ecaption#
Ecadre = Me.Width - Me.InsideWidth: Ecaption = Me.Height - Me.InsideHeight
Me.Tag = Me.Width & ";" & Me.Height
WsTate = Application.WindowState
For Each ctrl In Me.Controls
With ctrl
.Tag = .Left & ";" & .Top & ";" & .Width & ";" & .Height
On Error Resume Next: .Tag = .Tag & ";" & .Font.Size
Err.Clear
End With
Next
Application.WindowState = xlMaximized
With Me
.StartUpPosition = 0
.Top = -(Ecaption - (Ecadre / 2))
.Left = Application.Left + Ecadre
.Height = Application.Height + (Ecadre * 2)
.Width = Application.Width - Ecadre
End With
'DoEvents
NewLarge = Me.Width / Split(Me.Tag, ";")(0)
NewHaut = Me.Height / Split(Me.Tag, ";")(1)
For Each ctrl In Me.Controls
With ctrl
Mem = Split(.Tag, ";")
.Left = Mem(0) * NewLarge: .Width = Mem(2) * NewLarge
.Top = Mem(1) * NewHaut: .Height = Mem(3) * NewHaut
On Error Resume Next: .Font.Size = Mem(4) * NewHaut
Err.Clear
End With
Next
Application.WindowState = WsTate
End Sub