Hi all,
I want to display my webpage in a Vb form and I'm using the Webbrowser control to do this. My webpage uses popups to allow the user to filter for information. There may be up to 3 popup levels. I would like the popup to appear on the same Webbrowser control, and when the filter selection is made, my Browser control to act accordingly i.e. show the next level of popup, or revert back to the main website (as defined in the Website code). Currently my code will show each of the popups in my Browser control, but any selection made in the popup isn't returned and my main page isn't reloaded. Any help would be gratefully received.
I want to display my webpage in a Vb form and I'm using the Webbrowser control to do this. My webpage uses popups to allow the user to filter for information. There may be up to 3 popup levels. I would like the popup to appear on the same Webbrowser control, and when the filter selection is made, my Browser control to act accordingly i.e. show the next level of popup, or revert back to the main website (as defined in the Website code). Currently my code will show each of the popups in my Browser control, but any selection made in the popup isn't returned and my main page isn't reloaded. Any help would be gratefully received.
Code:
Private WithEvents NewWebBrowserWindowHandler As SHDocVwCtl.WebBrowser_V1
Private Sub Form_Load()
Me.WindowState = vbMaximized
Set NewWebBrowserWindowHandler = WebBrowser1.object
WebBrowser1.Navigate "http://www.mywebsite.com"
End Sub
Private Sub NewWebBrowserWindowHandler_NewWindow(ByVal URL As String, ByVal Flags As Long, ByVal TargetFrameName As String, PostData As Variant, ByVal Headers As String, Processed As Boolean)
WebBrowser1.Navigate URL
Processed = True
End Sub
Private Sub Form_Resize()
On Error Resume Next
WebBrowser1.Width = Me.ScaleWidth
WebBrowser1.Height = Me.ScaleHeight - 1680
End Sub