9 Replies - 4524 Views - Last Post: 10 August 2009 - 12:00 AM Rate Topic: -----

#1 remorseless  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 29
  • View blog
  • Posts: 129
  • Joined: 08-August 09

Web Browser Navigation Problem

Posted 09 August 2009 - 05:25 AM

Hi guys. I have a problem with a web browser I'm creating :crazy: . Everytime I use

WebBrowser1.Navigate("www.google.com"), it doesn't load. It opens the same webpage you get when you try to navigate to a page and you're not connected to the internet.

Also, I opened a webpage that was saved on my computer, and that webpage had a link to a website on the internet, and when I clicked on it, it worked just fine! It's not my internet, what is it then?

Here's the snippet of my code:

Private Sub bgo_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bgo.Click
		WebBrowser1.Navigate(TextBox1.Text())
		Me.Text = "Godzilla WaterFox - " + WebBrowser1.DocumentTitle()
	End Sub


Help me please. :D

Is This A Good Question/Topic? 0
  • +

Replies To: Web Browser Navigation Problem

#2 TADS  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 161
  • Joined: 09-August 08

Re: Web Browser Navigation Problem

Posted 09 August 2009 - 08:28 AM

try changing

 WebBrowser1.Navigate(TextBox1.Text())



to

 WebBrowser1.Navigate(TextBox1.Text)



taken out the () off the end of the textbox1.text

should be no problems like that

Kev
Was This Post Helpful? 0
  • +
  • -

#3 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 520
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: Web Browser Navigation Problem

Posted 09 August 2009 - 12:42 PM

TADS is correct.

However, I'll explain. :)

When you have the ( ), it means you're trying to call a function called Text. And what you want is the Text property, which is not the same as a function.

Text -- property
Text() -- function

This post has been edited by Locke: 09 August 2009 - 12:43 PM

Was This Post Helpful? 0
  • +
  • -

#4 remorseless  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 29
  • View blog
  • Posts: 129
  • Joined: 08-August 09

Re: Web Browser Navigation Problem

Posted 09 August 2009 - 04:50 PM

View PostTADS, on 9 Aug, 2009 - 07:28 AM, said:

try changing

 WebBrowser1.Navigate(TextBox1.Text())



to

 WebBrowser1.Navigate(TextBox1.Text)



taken out the () off the end of the textbox1.text

should be no problems like that

Kev


Doesn't work. I have tried that before, that snippet was just when I was trying everything to get it working :P

Any other ideas? :crazy:
Was This Post Helpful? 0
  • +
  • -

#5 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1002
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Web Browser Navigation Problem

Posted 09 August 2009 - 04:57 PM

Is AllowNavigation set to false?
Was This Post Helpful? 0
  • +
  • -

#6 TADS  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 161
  • Joined: 09-August 08

Re: Web Browser Navigation Problem

Posted 09 August 2009 - 05:04 PM

unless its your cookies or something in IE im not sure as the posted code works
Was This Post Helpful? 1
  • +
  • -

#7 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1002
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Web Browser Navigation Problem

Posted 09 August 2009 - 05:20 PM

View PostTADS, on 9 Aug, 2009 - 04:04 PM, said:

unless its your cookies or something in IE im not sure as the posted code works

Yes, it does work, but the WebBrowser control can sometimes be a dodgy one as it's loaded as an ActiveX control. Calls too early will result in an error, calls when it's still loading will do nothing, etc. etc.

However as I suggested it may just be something simple in that a property was set invalid thus not allowing it to navigate :)
Was This Post Helpful? 0
  • +
  • -

#8 remorseless  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 29
  • View blog
  • Posts: 129
  • Joined: 08-August 09

Re: Web Browser Navigation Problem

Posted 09 August 2009 - 09:14 PM

View PostTADS, on 9 Aug, 2009 - 04:04 PM, said:

unless its your cookies or something in IE im not sure as the posted code works


Ok, I've checked out the code. The form is fine. AllowNavigation is set to True.

I'm checking right now to see if it's IE settings.

This is so annoying :angry: Why can't it work normally? *cries*
Was This Post Helpful? 0
  • +
  • -

#9 Ändrew  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 25
  • View blog
  • Posts: 312
  • Joined: 21-April 08

Re: Web Browser Navigation Problem

Posted 09 August 2009 - 11:27 PM

It could be your DNS so try putting this in Run ipconfig /flushdns.

Ändrew

This post has been edited by Ändrew: 09 August 2009 - 11:27 PM

Was This Post Helpful? 0
  • +
  • -

#10 remorseless  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 29
  • View blog
  • Posts: 129
  • Joined: 08-August 09

Re: Web Browser Navigation Problem

Posted 10 August 2009 - 12:00 AM

Ok, I finally found it.. Sorry for wasting your time :P

Turns out I'm a silly willy. I had LAN Settings on proxy (I use this computer for school as well) when I was at home. So for all beginners out there just like me, don't do the same mistake as me :P

Again, sorry for wasting your valueable time. You've all been very helpful :^:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1