Private Sub UserForm_Activate()
For Each ctrl In Me.controls
ctrl.Tag = ctrl.Tag & ctrl.Top & ";" & ctrl.Left & ";" & ctrl.Width & ";" & ctrl.Height
Select Case TypeName(ctrl)
Case "TextBox", "Label", "CommandButton", "Frame", "MultiPage", "ListView", "ComboBox", "CheckBox", "OptionButton"
ctrl.Tag = ctrl.Tag & ";" & ctrl.Font.Size
End Select
Next
SetWindowLongA fwa(vbNullString, Me.Caption), -16, &H94CF0080
showw fwa(vbNullString, Me.Caption), 3
End Sub
re
donne moi ton userform
comme tu veux
réfléchi une secondeAprés la taille, il faut que mon pote y vois quand même, il n'est plus tout jeune
Private Sub UserForm_Activate()
Dim ctl As Control, ratioW As String, ratioH As String
Set UserActif = Me
ratioW = Application.Width / Me.Width
ratioH = Application.Height / Me.Height
Me.Left = 0
Me.Top = 0
Me.Width = Application.Width
Me.Height = Application.Height
For Each ctl In Me.Controls
ctl.Left = ctl.Left * ratioW
ctl.Top = ctl.Top * ratioH
ctl.Width = ctl.Width * ratioW
ctl.Height = ctl.Height * ratioH
ctl.Font.Size = ctl.Font.Size * ratioH
Next
End Sub