31-07-19, 08:22 AM
(31-07-19, 07:22 AM)سعود كتب : بعد اذن صاحب المشاركة اللي كنت اقصدها لكن نسيت العنوان فوجدته شارك بها لكن لهدف لا اعرفه اخفاهاكتبت الكود فأصبح بهذا الشكل فعطاني خطأ سوف ارفق المشروع في المرفقات حتي تطلع عليه
PHP كود :
PHP كود :
Dim Rgx As New Regex(TextBox1.Text, RegexOptions.IgnoreCase)
RichTextBox1.SelectAll()
RichTextBox1.SelectionBackColor = RichTextBox1.BackColor
For Each m As Match In Rgx.Matches(RichTextBox1.Text)
RichTextBox1.SelectionStart = m.Index
RichTextBox1.SelectionLength = m.Length
RichTextBox1.SelectionBackColor = Color.Yellow
Next
كود :
Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs) Handles RichTextBox1.TextChanged
Dim m As New Regex("'hidden' assets|100% free|100% satisfied|50% off")
If m.IsMatch(RichTextBox1.Text) Then
Dim Rgx As New Regex(RichTextBox1.Text, RegexOptions.IgnoreCase)
RichTextBox1.SelectAll()
RichTextBox1.SelectionBackColor = RichTextBox1.BackColor
For Each m As Match In Rgx.Matches(RichTextBox1.Text)
RichTextBox1.SelectionStart = m.Index
RichTextBox1.SelectionLength = m.Length
RichTextBox1.SelectionBackColor = Color.Yellow
Next
End If
End Sub
