|
-
Nov 24th, 1999, 01:11 AM
#1
Thread Starter
Hyperactive Member
I assume that you are looking for a keyword, and whatever values are being returned are getting dumped into a list box. There are 2 things you can do, either dump the returning variables into an array, checking each existing array element to see if it exists, or before you put the value into the list box, check all the existing elements of the list box. I'm not sure which would be faster, depends on how many results will be returned. This is assuming of course that the results being returned are being returned one at a time somewhere. Where ever that is, put your loop there.
Assuming you have a list box (lstResults), call the DumpResults function for each result you find, sending the result string.
like this:
strResult = "Result string"
DumpResult(strResult)
function DumpResults(strTemp as string)
Dim inti As Integer, intJ As Integer
intJ = lstResults.ListIndex 'stores what ever index you're at
For inti = 0 To lstResults.ListCount - 1
lstResults.ListIndex = inti
If lstResults.Text = strTemp Then Exit Function
Next inti
lstResults.AddItem strTemp
lstResults.ListIndex = intJ
end function
[This message has been edited by netSurfer (edited 11-24-1999).]
-
Nov 24th, 1999, 12:06 PM
#2
New Member
When my program searches for a keyword and returns with the results I find that I get the same link in my listbox a number of times!
How can i get rid of these multiple links i don't need?
thanx,
evilmonkeyIII
-
Nov 24th, 1999, 12:38 PM
#3
Guru
Huh???
------------------
Yonatan
Teenage Programmer
E-Mail: [email protected]
ICQ: 19552879
AIM: RYoni69
-
Nov 24th, 1999, 05:29 PM
#4
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|