Graisse de la police:
Dans Vb.Net, cette propriété n’est que ReadOnly.
Il faut donc créer une (ou plusieurs) police(s), et affecter celle qui convient à l’objet souhaité.
Exemple: pour un TextBox:
Dim PoliceNormale As New Font(« Sans Serif », 7, FontStyle.Regular)
Dim PoliceGrasse As New Font(« Sans Serif », 7, FontStyle.Bold)
If isOk Then
TextBoxValue.Font = PoliceNormale
TextBoxValue.ForeColor = Color.Black
Else
TextBoxValue.Font = PoliceGrasse
TextBoxValue.ForeColor = Color.Red
End If