help with vb.net app

Discussion in 'Programming' started by kirbsuk83, Mar 23, 2010.

  1. #1
    im creating a very basic vb.net app and would like some advice
    im putting myself through a steep learning curve.
    basically i have the app so that it opens a webpage in a browser window
    but what i would like it to do is once the first page has loaded, to open a different webpage in the same browser window
    like i said its very very basic
    can anyone advise me on the steps i need to make next here is the code so far
    Public Class Form1
        Dim automate As Boolean
        Dim yourpage As String
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            yourpage = TextBox1.Text
            automate = True
            WebBrowser1.Navigate("http://www.google.com")
    
        End Sub
    
        Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
            If automate = True Then automate = False Else Exit Sub
        End Sub
    End Class
    Code (markup):
    so what i would like it to do is open a different page for example yahoo once the first page has finished loading, is this possible?
    my coding skills are very very basic like i said im putting myself through a steep learning curve
    what i was thinking is that it would have to go through a loop then once it returns to the first page it stops and gives a message box saying complete
    any help would be appretiated
    cheers
     
    kirbsuk83, Mar 23, 2010 IP