Hi All,
I'm having trouble working with the AxWebBrowser. I can't get any menus or the statusbar to display. Navigate works correctly, but goBack, goForward, etc. throw InvalidActiveXState Exceptions. I've been stuck for a few days now and any help would be appreciated!
Code:
Public Class Internet_Viewer_new
Inherits WindowsApplication4.BaseForm
#Region " Windows Form Designer generated code "
...
#End Region
Public WithEvents ie As New AxSHDocVw.AxWebBrowser
'This tells the browser where to navigate to
Public Sub toNavigate(ByVal url As String)
ie.Navigate2(url)
End Sub
Public Sub toBack()
ie.GoBack()
End Sub
Public Sub toForward()
ie.GoForward()
End Sub
Private Sub Internet_Viewer_new_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
ie.Location = PanelUnique.Location
ie.Parent = Me.TopLevelControl
ie.Size = PanelUnique.Size
Me.Controls.Add(ie)
ie.BringToFront()
ie.Show()
ie.Navigate2("about:blank")
End Sub
End Class
Exception:
An unhandled exception of type 'InvalidActiveXStateException' occurred in axinterop.shdocvw.dll

Trouble with InvalidActiveXStateException in AxWebBrowser