VB Code:
'RTB = RichTextBox
'NF.PageTitle = Is a public variable, so you can handle html page's title
If STR = "<title></title>" Then
Dim m
m = InputBox("Please enter web pages title: ", "Enter title", NF.PageTitle)
If m <> "" Then
NF.PageTitle = m
Dim FS, FE, FV
FS = InStr(1, RTB.Text, "<title>", vbTextCompare)
If FS > 0 Then
RTB.SelStart = FS + 6
FE = InStr(1, RTB.Text, "</title>", vbTextCompare)
RTB.SelLength = FE - FS - 7
RTB.Text = Replace(RTB.Text, RTB.SelText, NF.PageTitle)
Else
RTB.SelStart = 0
RTB.SelText = "<title>" & NF.PageTitle & "</title>"
End If
Else
Exit Sub
End If
End If