Web Browser project

I am working on a very simple browser, mainly for quick web surfing without the need of menus, favorites, and other fancy features seen in other browsers.

The problem is, im quite new to this programming language, and i barely got anything out of what little time i had in Introduction to Computer Programming (using Visual Basic 6.0) before being pulled out of that class to make up a required credit.
Im clueless as to how to get the WebBrowser object to respond to the input in the AddressBar, and display the site the user types.

Any help on this would be really greatful.
Thanks



Answer this question

Web Browser project

  • xyzt

    Well, I'm not sitting at my main computer (the one with VB installed) so I can't be exact. But I believe it is in the project properties. (Found in the "Project' menu at the top.) It's under 'Publish' I believe... it may not be but I know it's in the project properties window.

  • forrestcupp

    yes :-)

    Me.AddressBar.Navigate(Me.AddressBar.Navigate) 'wrong!

    Me.theWebBrowserControl.Navigate(Me.AddressBar.Text) 'right!

     

    you need to give it a string into the navigate method as that is the overload it accepts, not a method :-)

    however you should not navigate in the textchanged event as it would mean anything the user types, it will navigate to that which is incorrect. you should implement the keydown event on the textbox, check to see if they pressed enter or return then navigate.



  • Hir&#233&#59;n

    Hi Vashnik,

    I recently dealed with this project aswell and I believe I might be of some assistance.

    One suggestion might be to make the 'Go' button activate when the user presses 'Enter'. This is more convienent and I personally cannot browse the web without this feature. To do this follow these instructions:

    In design mode, click on your form. Then in the properties windows find 'Accept Button'. Hit the drop down list and select your 'Go button' from the list.

    Next, you may want to make the address bar your first tab index. (Meaning that when you start your program your cursor will already be in the address bar so you can immediately begin typing an address. Do this by:

    Select your address bar in design mode, in the properties window find 'Tab Index' make the tab index 0. Then make sure all your other objects have a higher tab index than it.

    Or an easier approach might be to double click on your form. Make sure you are in the 'Form1_Load' sub. Insert the following code:

    AddressBar.Focus()

    In place of 'AdressBar' put the name of your address bar.


    Hope that helped, ask for more.

  • Okugops

    Thanks, now i have a new question... how do i change the description of the program from "WindowsApplication1" to something of my choice


  • Nikola Atanasov

    I overlooked a button, so needless to say i found where to edit more information.

    By the way, i am using Visual Basic 2005 Express


  • malc_s

    Visual Studio 2005 no longer accepts "Navigation" in this kind of setup:

    Me.AddressBar.Navigate(Me.AddressBar.Text)

    Am i doing something wrong

    Here is the code:

    Private Sub AddressBar_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddressBar.TextChanged

    Me.AddressBar.Navigate(Me.AddressBar.Text)

    End Sub

     

    Edit: I meant to put text in the last part. Even with the corrected part, it still refused to accept it and won't work.



  • Skapol

    I do not see it, i have looked in the project properties and i have checked all fields/tabs. I have not seen anything related to the description field for my application.


  • wraithzshadow

    I recieve the following error:

    'Navigate' is not a member of 'System.Windows.Forms.TextBox'.

    I have no clue what i did wrong. I put:

    Me.AddressBar.Navigate(Me.AddressBar.Text)



  • Steve Huckett

    Thank you so very much. :)

    I may have future questions as i decide to develop more features to it (as needed). But so far, the browser is working quite well.


  • iccle

    no you dont need that folder, all you need is the output (bin) directory files (not including the .pdb file)

  • GM55

    Sorry, I forgot to ask, which version of visual basic are you using If you are using VB 2005 then it will be in:

    Project > (Project Name) Properties > Application > Assembly Information...

    Otherwise, you can change the title, description, etc. in the AssemblyInfo.vb file. In that file you should see something like this:


    <Assembly: AssemblyTitle("")>
    <Assembly: AssemblyDescription("")>
    <Assembly: AssemblyCompany("")>
    <Assembly: AssemblyProduct("")>
    <Assembly: AssemblyCopyright("")>
    <Assembly: AssemblyTrademark("")>
    <Assembly: CLSCompliant(True)>

    Inbetween the quotation marks insert your info. For example:

    <Assembly: AssemblyDescription("A simple web browser.")>

    Understand I am almost positive you can do this in any version of VB but I may be terribly wrong. Hope that helps.

  • haryindsfjdbf

    it should be the webbrowser control name:

    Me.theWebBrowserControl.Navigate(Me.AddressBar.Text)

    the post has been edited - there was a forum issue when i posted and didnt seem to post the edited response



  • Chris Honcoop

    Thank you very much. ^.^ yes, that is quite helpful indeed. I have finished my project, now all i need to do is zip up and publish it. When i package it, do i need the TempPE folder included


  • MU786

    drag and drown web browser control on form

    perhaps you may want to drag and drop a textbox and a button

     

    on the button, double click on it to make an onclick event

     

    then:

     

    Me.theWebBrowserControlName.Navigate(Me.theTextBoxName.Text)

     

    this will navigate to the page the user typed in the textbox and display it in the control

    .NET does it all for you

     

     



  • Web Browser project