
'Chargement de la fenêtre principale

Private Sub UserForm_Activate()

ratiow = Application.Width / Me.Width
ratioh = Application.Height / Me.Height
Me.Left = -5
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

If Left(ctl.Name, 3) = "Lab" Then
ctl.Font.Name = "MAIF Medium"
ctl.Font.Size = 12
ctl.BackColor = RGB(237, 233, 226)
'Frame4.BackColor = RGB(237, 233, 226)
End If

If Left(ctl.Name, 1) = "B" Then
'bouton en bas
If Right(ctl.Name, 1) = "j" Then
ctl.Font.Name = "MAIF"
ctl.Font.Size = 10
ctl.BackColor = RGB(251, 241, 243)
ctl.ForeColor = RGB(198, 34, 34)
Else
'reste des boutons
ctl.Font.Name = "MAIF"
ctl.Font.Size = 14
ctl.Font.Bold = True
ctl.BackColor = RGB(198, 34, 34)
ctl.ForeColor = RGB(255, 255, 255)
End If
End If
If Right(ctl.Name, 1) = "j" Then
ctl.Font.Name = "MAIF"
ctl.Font.Size = 10
ctl.BackColor = RGB(251, 241, 243)
ctl.ForeColor = RGB(198, 34, 34)

End If
If Left(ctl.Name, 3) = "Fra" Then
ctl.Font.Name = "MAIF"
ctl.Font.Size = 15
ctl.BackColor = RGB(237, 233, 226)
End If

If Left(ctl.Name, 3) = "Ong" Then
ctl.Font.Name = "MAIF"
ctl.Font.Size = 15
End If

If Left(ctl.Name, 3) = "BNo" Or Left(ctl.Name, 3) = "BGl" Then
ctl.BackColor = RGB(251, 241, 243)
ctl.ForeColor = RGB(198, 34, 34)
End If

If Left(ctl.Name, 3) = "Tex" Then
ctl.Font.Name = "MAIF"
ctl.Font.Size = 10
ctl.ScrollBars = 2
ctl.MultiLine = True
ctl.EnterKeyBehavior = True
End If

If Left(ctl.Name, 1) = "C" Then
ctl.Font.Name = "MAIF"
ctl.Font.Size = 15
ctl.Style = fmStyleDropDownList
End If

If Left(ctl.Name, 3) = "Tit" Then
ctl.Font.Name = "MAIF Medium"
ctl.Font.Size = 22
ctl.BackColor = RGB(237, 233, 226)
ctl.ForeColor = RGB(198, 34, 34)

End If

If Left(ctl.Name, 3) = "Ima" Then
ctl.BackColor = RGB(237, 233, 226)
End If
 
If Left(ctl.Name, 18) = "BDiagnosticGeneral" Then
ctl.Caption = "Croisement du diagnostic général " & Chr(10) & "et du diagnostic local"
End If
Next



BackColor = RGB(237, 233, 226)
Label1.ForeColor = RGB(198, 34, 34)
Label1.Caption = "Développement de l'entité " & ThisWorkbook.Sheets("Parametrage").Range("Y2")
Label1.Font.Size = 23
Label1.Font.Bold = True    
    
End Sub