Re: Loop not working in VB.NET
- From: "rowe_newsgroups" <rowe_email@xxxxxxxxx>
- Date: 14 Nov 2006 15:39:44 -0800
InStr is (if I remember correctly) case sensitive, so make sure everything
matches in upper/lower case.
Easiest way would be to convert all the "badwords" and the URL to
uppercase characters. I believe the command is .ToUpper (I don't have
vb on this machine)
Thanks,
Seth Rowe
Tim Patrick wrote:
InStr is (if I remember correctly) case sensitive, so make sure everything
matches in upper/lower case. Without seeing the code used to define and populate
BadWords(), it's hard to make guesses about what it contains.
-----
Tim Patrick
Start-to-Finish Visual Basic 2005
I am working on a project which tracks 'bad' words in IE and im using
a For loop to check for an array of words in he address bar. I have
included the broken code below. Any pointers on why it isnt working
would be very useful.
Private Sub BeginNavigate(ByVal pDisp As Object, ByRef URL As Object,
ByRef Flags As Object, ByRef TargetFrameName As Object, ByRef PostData
As Object, ByRef Headers As Object, ByRef Cancel As Boolean)
Dim i As Integer
For i = 0 To BadWords.Length - 1
If InStr(URL.ToString(), BadWords(i)) Then
IE.Quit()
End If
Next
End Sub
Thanks in advance
.
- References:
- Loop not working in VB.NET
- From: jimmy
- Re: Loop not working in VB.NET
- From: Tim Patrick
- Loop not working in VB.NET
- Prev by Date: Re: Standalone VB.Net app?
- Next by Date: Copying files in VB.NET 2005
- Previous by thread: Re: Loop not working in VB.NET
- Next by thread: Re: Loop not working in VB.NET
- Index(es):
Relevant Pages
|