Dim start As Integer = 0
Do
start = r.Text.IndexOf("Add type", start)
If start = -1 Then Return 'if not found the value will be -1
r.SelectionStart = start
r.SelectionLength = 8
r.SelectionColor = Color.Red
start += 8
Loop
If sColorcode = 1 Then
Dim start As Integer = 0
Do
start = txtconf.Text.IndexOf("AddIcon", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddIcon")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddIconByEncoding", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddIconByEncoding")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddIconByType", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddIconByType")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AcceptMutex", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AcceptMutex")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AcceptPathInfo", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AcceptPathInfo")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AcceptFileName", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AcceptFileName")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("Action", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("Action")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddAlt", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddAlt")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddAltByEncoding", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddAltByEncoding")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddAltByType", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddAltByType")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddCharset", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddCharset")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddDefaultCharset", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddDefaultCharset")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddDescription", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddDescription")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddEncoding", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddEncoding")
txtconf.SelectionColor = Color.RoyalBlue
start += 8
Loop
Do
start = txtconf.Text.IndexOf("AddHandler", start)
If start = -1 Then Return 'if not found the value will be -1
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddHandler")
txtconf.SelectionColor = Color.OrangeRed
start += 8
Loop
End If
start += 8 'change this number to the length of your string.
If start = -1 Then Return
If start = -1 Then Exit Do
Dim start As Integer = 0
Do
start = txtconf.Text.IndexOf("AddIcon", start)
If start = -1 Then Exit Do
txtconf.SelectionStart = start
txtconf.SelectionLength = Len("AddIcon")
txtconf.SelectionColor = Color.RoyalBlue
start += Len("AddIcon")
Loop
"AddIcon".Length
Do While start >= 0
start = txtconf.Text.IndexOf("AddIcon", start)
If start >= 0 Then
txtconf.SelectionStart = start
txtconf.SelectionLength = "AddIcon".Length
txtconf.SelectionColor = Color.RoyalBlue
start += "AddIcon".Length
End If
Loop
Dim start As Integer = 0
Sub Coloercodeing(sWord, sColor)
Do While start >= 0
start = txtconf.Text.IndexOf(sWord, start)
If start >= 0 Then
txtconf.SelectionStart = start
txtconf.SelectionLength = sWord.Length
txtconf.SelectionColor = Color.sColor
start += sWord.Length
End If
Loop
start = 0
end sub
Sub Colorcodeing(ByVal sWord as String, ByVal sColor as Color)
Dim start As Integer = 0
Do While start >= 0
start = txtconf.Text.ToLower.IndexOf(sWord.ToLower, start)
If start >= 0 Then
txtconf.SelectionStart = start
txtconf.SelectionLength = sWord.Length
txtconf.SelectionColor = Color.ToArgb
start += sWord.Length
End If
Loop
End Sub