How Can i Make my Own web borswer

Hey i Need heplp so far i've got a window with back, forward, refresh, stop and a url box and go with a webbroswer below i would like ot be able to get this to work heres the code below so far.

[code]

Public Class H2FWebBrowser

Private Sub cmdGo_Click()

wb.Navigate(txtURL.Text) 'make the webbrowser navigate to whatever is in txtURL

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles wb.DocumentCompleted

End Sub

Private Sub cmdGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGo.Click

End Sub

Private Sub cmdStop_Click()

wb.Stop()

End Sub

Private Sub cmdRefresh_Click()

wb.Refresh()

End Sub

Private Sub cmdForward_Click()

wb.GoForward()

End Sub

Private Sub cmdBack_Click()

wb.GoBack()

End Sub

End Class

[/code]

And i would love to be able to have favourites, and open new windows or tabs in the same window. and be able to have a help menu on there just that i'm a complete noob to this kind of thing so can anyone help me please. thanks.




Answer this question

How Can i Make my Own web borswer

  • Kris Nye

    The navigate method does work as long as it is a valid url:

    http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx

    The WebBrowser control cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

    The WebBrowser control has several properties, methods, and events related to navigation. The following members let you navigate the control to a specific URL, move backward and forward through the navigation history list, and load the home page and search page of the current user:

    If the navigation is unsuccessful, a page indicating the problem is displayed. Navigation with any of these members causes the Navigating, Navigated, and DocumentCompleted events to occur at different stages of navigation.</>



  • Ogulcank

    yeah the only thing what isn't working at the moment is if i type a website address for example http://bungie.net in the address bar and click go on press enter nothing happerns any ideas on how to fix this

  • Dottj

    Yeah thanks for all the help i got that working just started another thread asking about new windows is called addhandler error (need help) so you might want to read that, but thanks for all the help.

  • Nuno_Salvado

    your on the right path here...just use the methods provided by the webbrowser control...as far as a favorites folder...look into getting a list of favorites(files) from the users favorites directory and displaying them in a treeview control or a simple listbox control (the treeview will make it easier to display the folder/file hierarchy)

  • Angelo_f

    The first thing you'll probably consider doing is validating the text box. e.g., you need to check it's a valid web address... with or without the www., with or without the protocol (http/https/ftp etc.), with or without a valid domain extension etc. etc.

  • dlcollison

    Cheers mate thank you so much.

  • How Can i Make my Own web borswer