Hello,
I have an applicatin with the webbrowser control (.net not the COM component). I'm having trouble getting the URL to navigate to when the user clicks on a link that implements a pop up.
This is the code I have currently:
VB Code:
Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow Dim frmMe As New form() rmMe.Show() frmMe.WebBrowser1.Navigate(?????????) e.Cancel = True End Sub
I can't find any documentation about how to retrieve to URL for the destination file the user is navigating to. I have tried to get the URL from the StatusTextChanged routine like this:
VB Code:
Private Sub WebBrowser1_StatusTextChanged1(ByVal sender As Object, yVal As System.EventArgs) Handles WebBrowser1.StatusTextChanged strcurrenturl = WebBrowser1.StatusText End Sub
And then use the strcurrent variable in the navigate method in the openwindow routine, but that doesn't seem to work for every instance of a new page.
Any help would be greatly appreciated.




Reply With Quote