家用双层车库视频:打印控件(WebBrowser)在IE7/IE8上的解决办法

来源:百度文库 编辑:偶看新闻 时间:2024/04/26 01:38:01
http://blog.sina.com.cn/s/blog_53cdc0ea0100bkdf.html 

Windows XP SP2安装了IE7之后,无法使用IE的WebBrowser控件。

解决办法:搜索注册表中包含有“ieframe.dll\1”的字串,删除其中的“\1”部分,问题解决。

將以下內容粘贴至记事本,另存为WebBrowser.reg,然後双击执行。

代码:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}]

[HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1]
@="Microsoft Internet Controls"

[HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0]

[HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32]
@="C:\\WINDOWS\\system32\\ieframe.dll"

另外,该问题经过一段时间后,又会出现,应该是WINDOWS自动更新的问题,把上面保存的WebBrowser.reg在执行一次就可以。 

WebBrowser Control not working with ie8

http://www.vb6.us/forums/general-questions/webbrowser-control-not-working-ie8

WebBrowser Control doesn't work since I have installed IE8 ( When I Try to load WebBrowser [Microsoft Internet Controls] Control I get (file not found C:\windows\system32\ieframe.dll\1')) but ieframe.dll is definetaly there in system32 folder can you please help with this problem.
yours sincerely

Web browser        Fri, 09/17/2010 - 08:36 — keithuk

Well I have apps that use the web browser. On my WinXP I use IE7 so it uses shdocvw.dll. On my Vista laptop I use IE8 so the same app uses ieframe.dll. Both apps work perfectly so I'm not sure why you have a glitch?
 Fri, 10/23/2009 - 01:07 — ctop

WebBrowser Control now working             Fri, 10/23/2009 - 01:07 — ctop

Thanks for your help, I have it working now. After the Registry edit below, I also had to [Components]>[Browse] c:\windows\system32\shdocvw.dll and everything works.

I actually only made two changes to the registry:-(InProcServer32 and ToolboxBitmap)

[HKEY_CLASSES_ROOT\CLSID\{8856F961-340A-11D0-A96B-00C04FD705A2}\InProcServer32]
@="C:\\Windows\\system32\\shdocvw.dll"
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\CLSID\{8856F961-340A-11D0-A96B-00C04FD705A2}\ToolboxBitmap32]
@="C:\\Windows\\system32\\shdocvw.dll, 257"

Follow the below link:

http://www.tek-tips.com/viewthread.cfm?qid=1525582


 IE 版本的判断方法方法一,读去注册表:IE   的版本在HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Internet   Explorer下边的Version值。
方法二,利用WMI判断IE版本、判断Windows版本 http://blog.vckbase.com/abbey/articles/27020.html

一、判断IE版本

在网上找了很多判断IE版本的办法,大多是通过读取注册表中IE的Build值实现的。我在搜索WMI时发现了MicrosoftIE这个命名空间,仔细再看,又找到了一个类MicrosoftIE_Summary。经过一番试探,找到了其中的一个属性Build,即与注册表中一致的IE内部版本号,格式为

major version build number.sub-build number


随即,我又在http://support.microsoft.com/kb/164539/zh-cn上找到了各版IE对应的Build列表

版本                产品
-----------------------------------------------------------------
4.40.308         Internet Explorer 1.0 (Plus! for Windows 95)
4.40.520         Internet Explorer 2.0
4.70.1155        Internet Explorer 3.0
4.70.1158        Internet Explorer 3.0 (Windows 95 OSR2)
4.70.1215        Internet Explorer 3.01
4.70.1300        Internet Explorer 3.02 和 3.02a
4.71.544         Internet Explorer 4.0 Platform Preview 1.0 (PP1)
4.71.1008.3      Internet Explorer 4.0 Platform Preview 2.0 (PP2)
4.71.1712.6      Internet Explorer 4.0
4.72.2106.8      Internet Explorer 4.01
4.72.3110.8      Internet Explorer 4.01 Service Pack 1 (Windows 98)
4.72.3612.1713   Internet Explorer 4.01 Service Pack 2
5.00.0518.10     Internet Explorer 5 Developer Preview (Beta 1)
5.00.0910.1309   Internet Explorer 5 Beta (Beta 2)
5.00.2014.0216   Internet Explorer 5
5.00.2314.1003   Internet Explorer 5 (Office 2000)
5.00.2614.3500   Internet Explorer 5 (Windows 98 Second Edition)
5.00.2516.1900   Internet Explorer 5.01 (Windows 2000 Beta 3, build 5.00.2031)
5.00.2919.800    Internet Explorer 5.01 (Windows 2000 RC1, build 5.00.2072)
5.00.2919.3800   Internet Explorer 5.01 (Windows 2000 RC2, build 5.00.2128)
5.00.2919.6307   Internet Explorer 5.01 (Office 2000 SR-1)
5.00.2920.0000   Internet Explorer 5.01 (Windows 2000, build 5.00.2195)
5.00.3103.1000   Internet Explorer 5.01 SP1 (Windows 2000 SP1)
5.00.3105.0106   Internet Explorer 5.01 SP1(Windows 95/98 和 Windows NT 4.0)
5.00.3314.2101   Internet Explorer 5.01 SP2(Windows 95/98 和 Windows NT 4.0)
5.00.3315.1000   Internet Explorer 5.01 SP2 (Windows 2000 SP2)
5.00.3502.1000   Internet Explorer 5.01 SP3(仅 Windows 2000 SP3)
5.00.3700.1000   Internet Explorer 5.01 SP4(仅 Windows 2000 SP4)
5.50.3825.1300   Internet Explorer 5.5 Developer Preview (Beta)
5.50.4030.2400   Internet Explorer 5.5 和 Internet 工具 (Beta)
5.50.4134.0100   Internet Explorer 5.5 for Windows Me (4.90.3000)
5.50.4134.0600   Internet Explorer 5.5
5.50.4308.2900   Internet Explorer 5.5 Advanced Security Privacy Beta
5.50.4522.1800   Internet Explorer 5.5 Service Pack 1
5.50.4807.2300   Internet Explorer 5.5 Service Pack 2
6.00.2462.0000   Internet Explorer 6 Public Preview (Beta)
6.00.2479.0006   Internet Explorer 6 Public Preview (Beta) Refresh
6.00.2600.0000   Internet Explorer 6 (Windows XP)
6.00.2800.1106   Internet Explorer 6 Service Pack 1 (Windows XP SP1)
6.00.2900.2180   Internet Explorer 6 for Windows XP SP2
6.00.3663.0000   Internet Explorer 6 for Windows Server 2003 RC1
6.00.3718.0000   Internet Explorer 6 for Windows Server 2003 RC2
6.00.3790.0000   Internet Explorer 6 for Windows Server 2003(已发行)
6.00.3790.1830   Internet Explorer 6 for Windows Server 2003 SP1 和 Internet Explorer 6 for Windows XP x64
7.00.5730.1100   Internet Explorer 7 for Windows XP 和 Internet Explorer 7 for Windows Server 2003
7.00.6000.16386  Internet Explorer 7 for Windows Vista

剩下的代码便很简单了,比如这样的:

using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\CIMV2\Applications\MicrosoftIE",
    @"SELECT * FROM MicrosoftIE_Summary"
))
{
     string ieBuild = string
.Empty;

     foreach (ManagementObject queryObj in
 searcher.Get())
        ieBuild = queryObj["Build"
].ToString();

     if ((new Version(ieBuild)) < new Version("52014.0216"
))
        return
;
   }


二、判断Windows版本

与上述方法类似,只是换了个命名空间和相应的类,这回是root\CIMV2下的Win32_OperatingSystem。这个类有CaptionBuild等属性,我更喜欢用Caption,免去了比较数字形式的版本号之累,简单的字符串匹配就可以完成判断:

using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\CIMV2",
   "SELECT * FROM Win32_OperatingSystem"))
{
     string osCaption = string.Empty;

     foreach (ManagementObject queryObj in searcher.Get())
       osCaption = queryObj["Caption"].ToString();

    if (osCaption.IndexOf(@"Windows XP") < 0)
       return;
   }


posted on 2007-06-21 23:40 Abbey的小匣子

 (#)