Le code ne marche pas, besoins d'aide
nathan
-
kurth Messages postés 21 Date d'inscription Statut Membre Dernière intervention -
kurth Messages postés 21 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
j'ai récupéré un code à cette adresse: http://stackoverflow.com/questions/13583494/change-the-color-of-a-line-or-a-word-in-a-richtextbox
Mais le code VB ne ne marche pas j'ai essayé de le modifier mais il se passe rien.
voila ce que j'ai:
Merci
j'ai récupéré un code à cette adresse: http://stackoverflow.com/questions/13583494/change-the-color-of-a-line-or-a-word-in-a-richtextbox
Mais le code VB ne ne marche pas j'ai essayé de le modifier mais il se passe rien.
voila ce que j'ai:
Private Sub Test()
For Each i As Integer In RichTextBox1.Lines.Length
Dim Text As String = RichTextBox1.Lines(i)
RichTextBox1.Select(RichTextBox1.GetFirstCharIndexFromLine(i), Text.Length)
RichTextBox1.SelectionColor = ColorForLine(Text)
Next
End Sub
Private Function ColorForLine(Line As String) As color
If Line.Contains("Processing", ) Then
Return ColorForLine.Green
End If
End Function
Merci
A voir également:
- Le code ne marche pas, besoins d'aide
- Code ascii - Guide
- Comment déverrouiller un téléphone quand on a oublié le code - Guide
- Code puk bloqué - Guide
- Code activation windows 10 - Guide
- Code blocks - Télécharger - Langages