BRowser

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....

Val
07-17-2003, 09:00 PM
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?

Val
07-17-2003, 11:02 PM
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

zoul1380
07-18-2003, 12:48 AM
Ok tnx 4 d help

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum