guys ,Could anyone hlep me to get out of this hell ?
I am calling a dll method which is "Navigate" and "Navigate2" from my class "Navigation" but it keeps firing this error which damn says :
an unhandled exception of type "InvalidActiveXStateException" occurred in axinterop.shdocvw.dll
when I call this method from the form it's fine.
Don't you think this have to do with inheritence :
I tried this :![]()
VB Code:
Imports AxSHDocVw.AxWebBrowser Public Class Navigation Public Shared MyWeb As New AxSHDocVw.AxWebBrowser() Public Shared Function Back() As String MyWeb.GoBack() End Function Public Shared Function Forward() As String MyWeb.GoForward() End Function Public Shared Function Go() As String End Function Public Shared Function Refresh() As String MyWeb.Refresh() End Function Public Shared Function Stopp() As String MyWeb.Stop() End Function Public Shared Function Home() As String MyWeb.GoHome() End Function Public Shared Function Navigate() As String Dim nullObject As System.Object = 0 Dim URL As Object Dim Str As String = "" Dim nullObjStr As System.Object = Str Cursor.Current = Cursors.WaitCursor ' Navigate to location found in textbox MyWeb.Navigate2(URL, nullObject, nullObjStr, nullObjStr, nullObjStr) Cursor.Current = Cursors.Default 'or you can safely use this : 'MyWeb.Navigate("www.home.com") End Function End Class





Reply With Quote