10-09-15, 09:57 PM
PHP كود :
Public Class Form1
Sub colorWord(ByVal word As String, ByVal color As Color) ' by im4dbr0
For i As Integer = 0 To RichTextBox1.TextLength
Try
If RichTextBox1.Text.ElementAt(i).ToString = word.ElementAt(0).ToString Then
Dim found As Boolean = False
For j As Integer = 1 To word.Count - 1
If RichTextBox1.Text.ElementAt(i + j) = word.ElementAt(j) Then
found = True
Else
found = False
Exit For
End If
Next
If found = True Then
RichTextBox1.Select(i, word.Length)
RichTextBox1.SelectionColor = color
End If
End If
Catch ex As Exception
Continue For
End Try
Next
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim Words As New List(Of String)
Words.Add(TextBox1.Text)
For i As Integer = 0 To Words.Count - 1
colorWord(Words.Item(i), Color.Red)
Next
End Sub
End Class
![[صورة مرفقة: 201593205620.png]](http://lion.our-lab.net/sw/MARSOWL-PC/201593205620.png)
المشكلة حرف واحد ما ضبط في العربي
بيمشي معك في حرفين فأكثر
سبحان الله والحمدلله ولا إله إلا الله والله أكبر
اللهم اغْفِرْ لِلمؤمنين والمؤمنات والمسلمين والمسلمات الأحياء منهم والأموات


