3 Replies - 578 Views - Last Post: 03 April 2013 - 05:03 PM Rate Topic: -----

#1 fakefly2  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-April 13

Setting Up Homepage For Browser

Posted 02 April 2013 - 11:13 AM

Hi, I am not great at all I quite admit with coding.
I am very new to Visual Basic 2010/2008 and yes you can feel free to call me a noob.
I am trying to set up a homepage for my basic browser I have running fine currently.
It does not include tabbing, as for right now I didn't set that up.
The beginning of my code has this written:
Public Class Form1

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        WebBrowser1.Navigate(TextBox1.Text)
    End Sub

Help for this code that would work would be greatly appreciated.
Thanks in advance,
Fakefly

Is This A Good Question/Topic? 0
  • +

Replies To: Setting Up Homepage For Browser

#2 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3822
  • View blog
  • Posts: 13,544
  • Joined: 12-December 12

Re: Setting Up Homepage For Browser

Posted 02 April 2013 - 11:32 AM

You must be new to VB.NET (which includes 2008/2010) as you are posting this in the VB6 forum. VB6 is a completely different language.

Anyway, the following link will lead you to setting up a Home page:

http://msdn.microsof...#code-snippet-2

If you only want to start at a particular page then:

WebBrowser1.Navigate("http://www.somepage.com")

or

WebBrowser1.Navigate(New Uri("http://www.somepage.com"))

I encourage you to adopt the habit of always renaming your controls from their defaults.

This post has been edited by andrewsw: 02 April 2013 - 11:36 AM

Was This Post Helpful? 0
  • +
  • -

#3 fakefly2  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-April 13

Re: Setting Up Homepage For Browser

Posted 03 April 2013 - 04:50 PM

Hi, I apologize I didn't respond earlier.
Thanks a billion for that page.
I know this probably sounds like a really dumb question, but is there a simple way to set a local HTML file as the homepage instead of an online file?
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3822
  • View blog
  • Posts: 13,544
  • Joined: 12-December 12

Re: Setting Up Homepage For Browser

Posted 03 April 2013 - 05:03 PM

View Postfakefly2, on 03 April 2013 - 11:50 PM, said:

Hi, I apologize I didn't respond earlier.
Thanks a billion for that page.
I know this probably sounds like a really dumb question, but is there a simple way to set a local HTML file as the homepage instead of an online file?

Looking at that page I linked to, it seems the GoHome method will only link to the home-page that the user has specified in their browser settings, rather than a home page that you have designated.

Given the above, you might create your own (custom) button that just navigates to a specific page, which could be a local page. Well, that is, (presumably) to a page that you have packaged with your application.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1