J
jmi0
I want to create a custom user control to be used in a web page (by
object tag) as an assembly. The user control needs to have a web
browser control in it. Having tried with the managed
System.Windows.Forms.WebBrowser or AxSHDocVw.AxWebBrowser, none of them
worked from IE invocation unfortunately. While
System.Windows.Forms.WebBrowser showed the page in Visual Studio 5000
Designer, AxSHDocVw.AxWebBrowser caught an exception at Navigate
function call.
Anyway, now I'm trying to use Shell.Explorer.2 in my custom user
control at runtime. The way I instantiate it is such:
Type loT = Type.GetTypeFromProgID("Shell.Explorer.2");
this.IE = Activator.CreateInstance(loT);
Then, this.IE can access all the properties of the ActiveX control,
like MenuBar, ToolBar etc.
However, it failed at, again, calling Navigate method. Debugger won't
step over the call.
If I replace Shell.Explorer.2 with InternetExplorer.Application, it
worked fine. Except that's not what I wanted because it launches IE in
a separate window.
Interestingly enough, if I embed Shell.Explorer.2 with its classid
directly into my web html page. It showed well, except the html object
id lost the reference to the control after exiting the onload function
in my javascript.
I must have missed something fundamantal in this attempt. Really hope
someone can direct me a little.
Thanks,
Jason
object tag) as an assembly. The user control needs to have a web
browser control in it. Having tried with the managed
System.Windows.Forms.WebBrowser or AxSHDocVw.AxWebBrowser, none of them
worked from IE invocation unfortunately. While
System.Windows.Forms.WebBrowser showed the page in Visual Studio 5000
Designer, AxSHDocVw.AxWebBrowser caught an exception at Navigate
function call.
Anyway, now I'm trying to use Shell.Explorer.2 in my custom user
control at runtime. The way I instantiate it is such:
Type loT = Type.GetTypeFromProgID("Shell.Explorer.2");
this.IE = Activator.CreateInstance(loT);
Then, this.IE can access all the properties of the ActiveX control,
like MenuBar, ToolBar etc.
However, it failed at, again, calling Navigate method. Debugger won't
step over the call.
If I replace Shell.Explorer.2 with InternetExplorer.Application, it
worked fine. Except that's not what I wanted because it launches IE in
a separate window.
Interestingly enough, if I embed Shell.Explorer.2 with its classid
directly into my web html page. It showed well, except the html object
id lost the reference to the control after exiting the onload function
in my javascript.
I must have missed something fundamantal in this attempt. Really hope
someone can direct me a little.
Thanks,
Jason