Discussion:
Cannot reference SHDocVw.
(too old to reply)
BlueMonkMN
2004-11-01 15:48:54 UTC
Permalink
Has support for the WebBrowser ActiveX control been discontinued or
something? I don't see "Microsoft Internet Controls" in the list of
available components, and when I try to browse for SHDocVw.dll, it
will show up as "Microsoft Internet Controls", but when I click OK, it
says shdocvw.dll could not be loaded. I can add a reference to it
(rather than referencing it as an ActiveX control), but I can't site
the control on the form if I only have a reference... need to use
Controls.add to do that. When I use Controls.Add, I have to give a
ProgID. The CLSID for the WebBrowser control's CoClass (according to
OLE COM Object viewer) is 8856F961-340A-11D0-A96B-00C04FD705A2, which
the registry points back to a ProgID of Shell.Explorer.2. So I tried
Me.Controls.Add("Shell.Explorer.2", "wbMain"), but when I try to put
that into a variable declared as type WebBrowser, I get a type
mismatch. So I put it into a variant temporarily. Then I used
TypeLibInfo to give me information about what methods could be
executed on the object I got back from Controls.Add (because Navigate
and Navigate2 weren't valid). They all looked very generic like you
would find on every control. Nothing relating to Windows Explorer or
Internet Explorer as far as I could tell. What's going on?
Charles Law
2004-11-01 16:31:48 UTC
Permalink
It looks like you might be using VB.NET. I can confirm that the WebBrowser
control is still available. When I select Customize Toolbox, and the COM
Components tab, it is listed as Microsoft Web Browser, shdocvw.dll,
Microsoft Internet Controls, 29/09/2004 (I have WinXP SP2 and IE6). I don't
recall having to browse to it the first time I used it.

HTH

Charles
Post by BlueMonkMN
Has support for the WebBrowser ActiveX control been discontinued or
something? I don't see "Microsoft Internet Controls" in the list of
available components, and when I try to browse for SHDocVw.dll, it
will show up as "Microsoft Internet Controls", but when I click OK, it
says shdocvw.dll could not be loaded. I can add a reference to it
(rather than referencing it as an ActiveX control), but I can't site
the control on the form if I only have a reference... need to use
Controls.add to do that. When I use Controls.Add, I have to give a
ProgID. The CLSID for the WebBrowser control's CoClass (according to
OLE COM Object viewer) is 8856F961-340A-11D0-A96B-00C04FD705A2, which
the registry points back to a ProgID of Shell.Explorer.2. So I tried
Me.Controls.Add("Shell.Explorer.2", "wbMain"), but when I try to put
that into a variable declared as type WebBrowser, I get a type
mismatch. So I put it into a variant temporarily. Then I used
TypeLibInfo to give me information about what methods could be
executed on the object I got back from Controls.Add (because Navigate
and Navigate2 weren't valid). They all looked very generic like you
would find on every control. Nothing relating to Windows Explorer or
Internet Explorer as far as I could tell. What's going on?
BlueMonkMN
2004-11-02 15:26:48 UTC
Permalink
Actually, I'm using C#, but the trials I described earlier (included
below) were being done in VB6 because I know for sure the web browser
control should work in VB6. In Visual Studio.NET, when I go to the
COM Components tab to add a COM component to the toolbox, Microsoft
Internet Controls is not there, and if I browse for SHDocVw.dll,
nothing happens after I select it, as far as I can tell. It just
returns be to the components list with nothing selected.

I also have WinXP SP2 and IE6, but I've tried the same test on a
similarly-installed Windows 2000 system (except it never had VB6 on
it). And I get the same result when attempting to add the component
in .NET. I seem to remember something about VB6 installing a
developer version of SHDOCVW.dll or something. Is this true? And/Or
is it possible that some security update replaced SHDOCVW.dll with one
that does not expose the WebBrowser control any more? (I think it
used to work as expected on both my systems).
Post by Charles Law
It looks like you might be using VB.NET. I can confirm that the WebBrowser
control is still available. When I select Customize Toolbox, and the COM
Components tab, it is listed as Microsoft Web Browser, shdocvw.dll,
Microsoft Internet Controls, 29/09/2004 (I have WinXP SP2 and IE6). I don't
recall having to browse to it the first time I used it.
HTH
Charles
Post by BlueMonkMN
Has support for the WebBrowser ActiveX control been discontinued or
something? I don't see "Microsoft Internet Controls" in the list of
available components, and when I try to browse for SHDocVw.dll, it
will show up as "Microsoft Internet Controls", but when I click OK, it
says shdocvw.dll could not be loaded. I can add a reference to it
(rather than referencing it as an ActiveX control), but I can't site
the control on the form if I only have a reference... need to use
Controls.add to do that. When I use Controls.Add, I have to give a
ProgID. The CLSID for the WebBrowser control's CoClass (according to
OLE COM Object viewer) is 8856F961-340A-11D0-A96B-00C04FD705A2, which
the registry points back to a ProgID of Shell.Explorer.2. So I tried
Me.Controls.Add("Shell.Explorer.2", "wbMain"), but when I try to put
that into a variable declared as type WebBrowser, I get a type
mismatch. So I put it into a variant temporarily. Then I used
TypeLibInfo to give me information about what methods could be
executed on the object I got back from Controls.Add (because Navigate
and Navigate2 weren't valid). They all looked very generic like you
would find on every control. Nothing relating to Windows Explorer or
Internet Explorer as far as I could tell. What's going on?
Charles Law
2004-11-03 08:47:17 UTC
Permalink
Before using this m/c I used one with Win2000, VB6 and .NET, and was still
able to use the WebBrowser control in .NET. I don't know what to suggest
really. I am not aware of developer version of shdocvw.dll. The version I
have is 6.0.2900.2518. You could try registering shdocvw.dll with regsrv32.

If you try to add a reference in the Solution Explorer, is Microsoft.mshtml
listed? This will be required to use the WebBrowser control. It is a .NET
assembly that wraps mshtml.dll. You could try adding a reference to this in
your project first, although I have never found it necessary.

Charles
Post by BlueMonkMN
Actually, I'm using C#, but the trials I described earlier (included
below) were being done in VB6 because I know for sure the web browser
control should work in VB6. In Visual Studio.NET, when I go to the
COM Components tab to add a COM component to the toolbox, Microsoft
Internet Controls is not there, and if I browse for SHDocVw.dll,
nothing happens after I select it, as far as I can tell. It just
returns be to the components list with nothing selected.
I also have WinXP SP2 and IE6, but I've tried the same test on a
similarly-installed Windows 2000 system (except it never had VB6 on
it). And I get the same result when attempting to add the component
in .NET. I seem to remember something about VB6 installing a
developer version of SHDOCVW.dll or something. Is this true? And/Or
is it possible that some security update replaced SHDOCVW.dll with one
that does not expose the WebBrowser control any more? (I think it
used to work as expected on both my systems).
Post by Charles Law
It looks like you might be using VB.NET. I can confirm that the WebBrowser
control is still available. When I select Customize Toolbox, and the COM
Components tab, it is listed as Microsoft Web Browser, shdocvw.dll,
Microsoft Internet Controls, 29/09/2004 (I have WinXP SP2 and IE6). I don't
recall having to browse to it the first time I used it.
HTH
Charles
Post by BlueMonkMN
Has support for the WebBrowser ActiveX control been discontinued or
something? I don't see "Microsoft Internet Controls" in the list of
available components, and when I try to browse for SHDocVw.dll, it
will show up as "Microsoft Internet Controls", but when I click OK, it
says shdocvw.dll could not be loaded. I can add a reference to it
(rather than referencing it as an ActiveX control), but I can't site
the control on the form if I only have a reference... need to use
Controls.add to do that. When I use Controls.Add, I have to give a
ProgID. The CLSID for the WebBrowser control's CoClass (according to
OLE COM Object viewer) is 8856F961-340A-11D0-A96B-00C04FD705A2, which
the registry points back to a ProgID of Shell.Explorer.2. So I tried
Me.Controls.Add("Shell.Explorer.2", "wbMain"), but when I try to put
that into a variable declared as type WebBrowser, I get a type
mismatch. So I put it into a variant temporarily. Then I used
TypeLibInfo to give me information about what methods could be
executed on the object I got back from Controls.Add (because Navigate
and Navigate2 weren't valid). They all looked very generic like you
would find on every control. Nothing relating to Windows Explorer or
Internet Explorer as far as I could tell. What's going on?
Continue reading on narkive:
Loading...