|
-
Apr 26th, 2007, 02:07 AM
#1
[2005] Web search.
Hi All,
I'm trying to search the internet with a Webbrowser.
It's working, but I'm not really pleased with the fact that I have to put the weppage and the abbreviation of the country in it before it shows me the page.
That's the code to navigate into the web:
Code:
Private Sub Navigate(ByVal address As String)
If String.IsNullOrEmpty(address) Then Return
If address.Equals("about:blank") Then Return
If Not address.StartsWith("http://") And _
Not address.StartsWith("https://") Then
address = "http://" & address
End If
If address.EndsWith("") then
address = address & ("what should I put here for the abbreviations")
End if
Try
webBrowser1.Navigate(New Uri(address))
Catch ex As System.UriFormatException
Return
End Try
End Sub
Thanks in advance.
sparrow1
-
Apr 27th, 2007, 05:42 PM
#2
Re: [2005] Web search.
Hi All,
I think I'm not clear enough.
What I want to accomplish is that I can browse the internet with my Webbrowser.
What I have so far is working, but I have to put the full name init like this:
www.vb forum.com
How or what do I have to change in my code that it can browse the internet with only a name like: airplanes or boots....
Wkr,
sparrow1
-
Apr 27th, 2007, 06:34 PM
#3
Frenzied Member
Re: [2005] Web search.
Code:
Private Sub Navigate(ByVal address As String)
If address.Equals("about:blank") Then Return
If String.IsNullOrEmpty(address) Then Return
If Not address.StartsWith("http://") Then
TextBox1.Text = "http://" & TextBox1.Text
End If
Try
WebBrowser1.Navigate(address)
Catch ex As System.UriFormatException
Return
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Navigate(TextBox1.Text)
End Sub
:?
-
Apr 28th, 2007, 03:51 AM
#4
Re: [2005] Web search.
Hi Fromethius,
It works, but I have to write the complete url, and that isn't what I really wants.
Is there a way to change my code that it's searching only by name.
Wkr,
sparrow1
-
Jun 1st, 2007, 07:28 AM
#5
Re: [2005] Web search.
Hi All,
After a lot of reading and trying to create a good working webbrowser, I found that I shouldn't use the Navigate Sub.
I found that I need to create a Search engine or Crawler to accomplish this.
Is there someone who could put me into the good direction, with a link or example.
Thanks in advance,
sparrow1
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
|