Capture url in open web page - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Capture url in open web page

I can't seem to find a way to get my URL variable to hold the url of the internet explorer window i have opened..... any ideas why?


Here is my code so far:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim Text As String = ""
Dim Webbrowser1 As Object
Dim url As String

Webbrowser1 = CreateObject("InternetExplorer.Application")
Webbrowser1.visible = True
Webbrowser1.Navigate("Http://www.facebook.com")


Do Until (Webbrowser1.busy = False)
Loop

Line2:

Dim PauseTime1 As Long = 1
Do Until (PauseTime1 = 400000000)
PauseTime1 = PauseTime1 + 1
Loop


url = [color=Red]Here i need the url to be captured[/color]
MsgBox(url)

If url = ("http://www.facebook.com/") Then
Else
GoTo Line2
End If


My.Computer.Keyboard.SendKeys("{Tab 14}")
My.Computer.Keyboard.SendKeys("Email")
My.Computer.Keyboard.SendKeys("{Tab}")
My.Computer.Keyboard.SendKeys("Password")
My.Computer.Keyboard.SendKeys("{enter}")



End Sub
End Class


Sign In or Register to comment.