zoul1380
07-17-2003, 08:48 PM
I have made a Browser from VB.. the problem is i want to filter the pages that will be displayed for example if the page has a the word of "SEX" in it. then the program will prevent it from displaying...
can any-1 help... tnx....
Look at the OnBeforeNavigate event. Set it's cancel parameter to True if a url contains the restricted keywords.
zoul1380
07-17-2003, 09:23 PM
how can i scan the page for those words?
You will be able to scan the page on OnNavigateComplete (right now I can't provide an example). You can, however scan the url for the restricted keywords:
'For this example, assume all your restricted keywords is in sRestr() array. In the real life you probably would want to use registry.
Function IsRestricted(ByVal Url As String) As Boolean
Dim i As Integer
For i = 0 To Ubound(sRestr)
If InStr(Url, sRestr(i)) Then
IsRestricted = True
Exit Function
End If
Next
End Function