I have a personalised webbrowser in VB 2005. It fills values into a form and submits the form.

The first page is "login.php", the next page is "home.php"

SendKeys.SendWait("{TAB}") 
        SendKeys.SendWait("{TAB}")
        SendKeys.SendWait("username")
        SendKeys.SendWait("{TAB}")
        SendKeys.SendWait("password")
        SendKeys.SendWait("{Enter}")

I want it to do something else based on the url after the form is submitted.

See if this helps.

Public Class Form1
    
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        WebBrowser1.Navigate("http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official")
    End Sub

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        If WebBrowser1.Url.AbsoluteUri = "http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official" Then
            MsgBox("Web-page located.", MsgBoxStyle.Information)
        End If
    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.