Hi

I want to make a url contol program.

url list in the listbox

and search button

if vocabulary in the url then
listbox 2 add item

example:

url:http://example.com
vocabulary : "car"
search: The car vocabulary in the documenttext ("source code") add listbox1 to listbox2

but I don't want slowly.I see same program very fast.What I am doing?

See if this helps.
1.TextBox, 1.Button, 2.ListBoxes

Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        With ListBox1.Items '// FOR.TESTING
            .Add("http://www.daniweb.com/software-development/vbnet/threads/410236")
            .Add("http://www.daniweb.com/software-development/vbnet/threads/409298/1746870#post1746870")
        End With
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        If Not TextBox1.Text = "" Then
            With ListBox2.Items
                .Clear()
                For Each itm As String In ListBox1.Items
                    If getCoolHttp(itm).Contains(TextBox1.Text) Then .Add(itm) '// get page source and check for the search.keyword.
                Next
            End With
        End If
    End Sub
    Private Function getCoolHttp(ByVal selCoolUrl As String) As String
        Me.Cursor = Cursors.WaitCursor
        Try
            Dim myResponse As Net.HttpWebResponse = Net.HttpWebRequest.Create(selCoolUrl).GetResponse '// connect.
            Dim myStream As IO.Stream = myResponse.GetResponseStream() '// get.
            Dim myReader As New IO.StreamReader(myStream) '// read.
            Dim webContent As String = myReader.ReadToEnd
            myReader.Close() : myStream.Close() : myResponse.Close()
            Me.Cursor = Cursors.Default
            Return webContent
        Catch ex As Exception
            Me.Cursor = Cursors.Default
            'MsgBox("Connection Error.", MsgBoxStyle.Critical)
            Return Nothing
        End Try
    End Function
End Class

>>but I don't want slowly.I see same program very fast.What I am doing?
.a few(2+)BackGroundWorkers (depending on user's p.c. net.connection and system.specs), can run the search.results on separate threads, Not just one As default for a WindowsApplication.
http://www.daniweb.com/software-development/vbnet/threads/348154/1479109#post1479109

Another suggestion: purchase a web.server, update web content frequently on it(your content), and use that for quicker results.

Hope this helps.

Edited 4 Years Ago by codeorder: n/a

hmm ok.Try to your code.But you are really answer friendly me.very thank you.

This article has been dead for over six months. Start a new discussion instead.