WebBrowser类 [英] WebBrowser class

查看:57
本文介绍了WebBrowser类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

我正在开发一个免费的Windows Scrabble(法语:))应用程序

广泛使用WebBrowser类的.NET 2.0进行配置,和

数据浏览。它在我的机器上使用WebBrowser类100%工作,并且在Microsoft.MsHtml组件中使用
。我可以通过事件访问页面上的所有元素

,我可以更改一些部分。一切都是用

XSLT渲染的,并通过msHtml直接更改文档。


但显然,它只适用于我的两台机器:-)


当我部署应用程序时,启用/禁用控件不起作用

当应用程序尝试访问SelectElement时,用户得到了

错误:

无法将类型为''System .__ ComObject''的COM对象强制转换为类类型

''mshtml.HTMLSelectElementClass''。进入CLR并且不支持IProvideClassInfo或没有任何interop程序集的COM组件

注册将包含在__ComObject类型中。这种类型的实例

不能投射到任何其他类;但是它们可以转换为接口,因为底层的COM组件支持接口的

IID的QueryInterface调用。


Microsoft.MsHtml随应用程序一起复制,所有用户都有正确安装

,因为它是唯一不起作用的东西


有没有人知道我要做什么,让它在不需要装载Visual Studio的机器上工作,因为它是唯一的区别我可以

弄清楚我的机器和用户机器吗?


谢谢


Laurent

Hello All,
I''m currently developing a free windows Scrabble (in french :)) application
that uses extensively the WebBrowser class of NET 2.0 for configuration, and
data browsing. It works 100% on my machine, with the WebBrowser Class, and
the Microsoft.MsHtml component. I can access all elements on the pages
through the events, I can change some parts. Everything is rendered with
XSLTs and changing directly the document through the msHtml thing.

But apparently, it works only well on both of my machines :-)

When I deploy the application, Enabling / Disabling controls does not work
and when the application try to access a SelectElement the users got that
error :
Unable to cast COM object of type ''System.__ComObject'' to class type
''mshtml.HTMLSelectElementClass''. COM components that enter the CLR and do
not support IProvideClassInfo or that do not have any interop assembly
registered will be wrapped in the __ComObject type. Instances of this type
cannot be cast to any other class; however they can be cast to interfaces as
long as the underlying COM component supports QueryInterface calls for the
IID of the interface.

The Microsoft.MsHtml is copied with the application and all users have a
correct installation, as it is the only thing that doesn''t work

does anyone knows what I have to do, to make it work on machines that
shouldn''t be loaded with Visual Studio, as it''s the only difference I can
figure out with my machines and users machines ?

Thank you

Laurent

推荐答案

我相信Microsoft.MsHtml是一个COM组件..尝试在安装它时使用
注册它。如果您正在使用VS Packaging ..有一个选项可以在属性窗口中为单个文件执行此操作

。检查属性,

属性名称非常明显..

VJ


" Laurent Lequenne" < 11 ******* @ hotmail.com>在消息中写道

news:Op ************** @ TK2MSFTNGP04.phx.gbl ...
I believe the Microsoft.MsHtml is a COM component.. Try registering it when
installing it. If you are using VS Packaging.. there is a option to do this
for a single file in the properties windows. Check the properties, the
property name is pretty obvious..

VJ

"Laurent Lequenne" <ll*******@hotmail.com> wrote in message
news:Op**************@TK2MSFTNGP04.phx.gbl...
Hello All,

我正在开发一个免费的Windows Scrabble(法语:))
应用程序
广泛使用WebBrowser类的.NET 2.0进行配置,
XSLT呈现,并通过msHtml直接更改文档。

但显然,它只适用于我的两台机器:-)

当我部署应用程序时,启用/禁用控件不起作用
当应用程序尝试访问SelectElement时,用户得到了
错误:
无法转换类型为''System的COM对象.__ ComObject''到类类型
''mshtml.HTMLSelectElementClass''。进入CLR并且不支持IProvideClassInfo或没有任何注册程序集注册的COM组件将被包装在__ComObject类型中。此类实例
不能投射到任何其他类;然而,只要底层的COM组件支持对接口的IID进行QueryInterface调用,就可以将它们转换为界面


复制Microsoft.MsHtml与应用程序和所有用户都有正确的安装,因为它是唯一不起作用

有谁知道我必须做什么,使它在机器上工作
不应该装载Visual Studio,因为它是我能用机器和用户机器解决的唯一区别吗?

谢谢你/>
Laurent
Hello All,
I''m currently developing a free windows Scrabble (in french :))
application
that uses extensively the WebBrowser class of NET 2.0 for configuration,
and
data browsing. It works 100% on my machine, with the WebBrowser Class, and
the Microsoft.MsHtml component. I can access all elements on the pages
through the events, I can change some parts. Everything is rendered with
XSLTs and changing directly the document through the msHtml thing.

But apparently, it works only well on both of my machines :-)

When I deploy the application, Enabling / Disabling controls does not work
and when the application try to access a SelectElement the users got that
error :
Unable to cast COM object of type ''System.__ComObject'' to class type
''mshtml.HTMLSelectElementClass''. COM components that enter the CLR and do
not support IProvideClassInfo or that do not have any interop assembly
registered will be wrapped in the __ComObject type. Instances of this type
cannot be cast to any other class; however they can be cast to interfaces
as
long as the underlying COM component supports QueryInterface calls for the
IID of the interface.

The Microsoft.MsHtml is copied with the application and all users have a
correct installation, as it is the only thing that doesn''t work

does anyone knows what I have to do, to make it work on machines that
shouldn''t be loaded with Visual Studio, as it''s the only difference I can
figure out with my machines and users machines ?

Thank you

Laurent



Euh我不这么认为,已经在NET组件中找到了

我的项目的引用,但也许它只是一个包装类,而且它是另一个DLL依赖的
?但不知道哪一个:-)

" VJ" < 6 ******** @ yahoo.com> écritdansle message de

news:Ob ************** @ TK2MSFTNGP03.phx.gbl ...
Euh I don"t thinkk so, it has been found in the NET components into the
references of my project, but maybe it''s just a wrapper class, and it''s
dependent of another DLL ? But No idea which one :-)
"VJ" <vi********@yahoo.com> a écrit dans le message de
news:Ob**************@TK2MSFTNGP03.phx.gbl...
我相信Microsoft.MsHtml是一个COM组件..尝试在安装时注册
。如果你正在使用VS Packaging ..有一个选项可以为属性窗口中的单个文件执行
。检查属性,
属性名称非常明显..

VJ

Laurent Lequenne < 11 ******* @ hotmail.com>在消息中写道
新闻:Op ************** @ TK2MSFTNGP04.phx.gbl ...
I believe the Microsoft.MsHtml is a COM component.. Try registering it when installing it. If you are using VS Packaging.. there is a option to do this for a single file in the properties windows. Check the properties, the
property name is pretty obvious..

VJ

"Laurent Lequenne" <ll*******@hotmail.com> wrote in message
news:Op**************@TK2MSFTNGP04.phx.gbl...
大家好,

我正在开发一个免费的Windows Scrabble(法语:))
应用程序
广泛使用WebBrowser类的.NET 2.0进行配置,

数据浏览。它在我的机器上100%工作,使用WebBrowser类,
和Microsoft.MsHtml组件。我可以通过事件访问页面上的所有元素,我可以更改一些部分。一切都是使用
XSLT呈现,并通过msHtml直接更改文档。

但显然,它只适用于我的两台机器:-)

当我部署应用程序时,启用/禁用控件不会
工作,当应用程序尝试访问SelectElement时,用户得到
该错误:
无法转换类型为''System的COM对象.__ ComObject''到类类型
''mshtml.HTMLSelectElementClass''。进入CLR和
的COM组件不支持IProvideClassInfo,或者没有任何注册的interop程序集将被包装在__ComObject类型中。此
类型的实例不能转换为任何其他类;然而,只要底层的COM组件支持
接口的IID的QueryInterface调用,就可以将它们转换为
接口。

复制Microsoft.MsHtml与应用程序和所有用户都有正确的安装,因为它是唯一不起作用

有谁知道我必须做什么,使它在机器上工作那个
不应该装载Visual Studio,因为它是我b $ b可以用机器和用户机器解决的唯一区别吗?

谢谢你/>
Laurent
Hello All,
I''m currently developing a free windows Scrabble (in french :))
application
that uses extensively the WebBrowser class of NET 2.0 for configuration,
and
data browsing. It works 100% on my machine, with the WebBrowser Class, and the Microsoft.MsHtml component. I can access all elements on the pages
through the events, I can change some parts. Everything is rendered with
XSLTs and changing directly the document through the msHtml thing.

But apparently, it works only well on both of my machines :-)

When I deploy the application, Enabling / Disabling controls does not work and when the application try to access a SelectElement the users got that error :
Unable to cast COM object of type ''System.__ComObject'' to class type
''mshtml.HTMLSelectElementClass''. COM components that enter the CLR and do not support IProvideClassInfo or that do not have any interop assembly
registered will be wrapped in the __ComObject type. Instances of this type cannot be cast to any other class; however they can be cast to interfaces as
long as the underlying COM component supports QueryInterface calls for the IID of the interface.

The Microsoft.MsHtml is copied with the application and all users have a
correct installation, as it is the only thing that doesn''t work

does anyone knows what I have to do, to make it work on machines that
shouldn''t be loaded with Visual Studio, as it''s the only difference I can figure out with my machines and users machines ?

Thank you

Laurent




嗯...对不起,我刚才看到了。 ..如果你正在使用浏览器

对象或MS浏览器控件,那将是它自己的一套Dlls..uhmm让我们看看.. b $ b你能告诉我怎么样你正在构建你的安装项目吗?。,就像一个

包括项目输出到VS.NET安装项目然后构建?

VJ


" Laurent Lequenne" < 11 ******* @ hotmail.com>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP02.phx.gbl ...
uhmm.. yes sorry, I just saw that myself... If you are using the browser
object or the MS Browser control, that will its own set of Dlls..uhmm lets
see.. Can you tell me how you are building your setup project?., Just like a
including a Project Output into VS.NET setup project and then building?
VJ

"Laurent Lequenne" <ll*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Euh I不要这么说,已经在.NET组件中找到了我的项目的参考资料,但也许它只是一个包装类,并且它依赖于另一个DLL?但不知道哪一个:-)

" VJ" < 6 ******** @ yahoo.com> écritdansle message de
新闻:Ob ************** @ TK2MSFTNGP03.phx.gbl ...
Euh I don"t thinkk so, it has been found in the NET components into the
references of my project, but maybe it''s just a wrapper class, and it''s
dependent of another DLL ? But No idea which one :-)
"VJ" <vi********@yahoo.com> a écrit dans le message de
news:Ob**************@TK2MSFTNGP03.phx.gbl...
我相信Microsoft.MsHtml是一个COM组件..尝试注册
I believe the Microsoft.MsHtml is a COM component.. Try registering it


安装它时。如果您正在使用VS Packaging ..有一个选项可以在属性窗口中为单个文件执行
installing it. If you are using VS Packaging.. there is a option to do


。检查属性,
属性名称非常明显..

VJ

Laurent Lequenne < 11 ******* @ hotmail.com>在消息中写道
新闻:Op ************** @ TK2MSFTNGP04.phx.gbl ...
for a single file in the properties windows. Check the properties, the
property name is pretty obvious..

VJ

"Laurent Lequenne" <ll*******@hotmail.com> wrote in message
news:Op**************@TK2MSFTNGP04.phx.gbl...
>大家好,
>
>
>我正在开发一个免费的Windows拼字游戏(法语:))
>申请
>广泛使用.NET 2.0的WebBrowser类
>配置,
>和
>数据浏览。它在我的机器上运行100%,使用WebBrowser类,> Microsoft.MsHtml组件。我可以访问页面上的所有元素
>通过这些活动,我可以改变一些部分。一切都呈现
>与
> XSLT并通过msHtml直接更改文档。
>
>但显然,它只适用于我的两台机器:-)
>
>部署应用程序时,启用/禁用控件不起作用>当应用程序尝试访问SelectElement时,用户得到了>错误:
>无法将System .__ ComObject类型的COM对象转换为类类型
> mshtml.HTMLSelectElementClass。进入CLR并执行>的COM组件不支持IProvideClassInfo或没有任何互操作程序集
> registered将包装在__ComObject类型中。 <此类型的实例>不能投到任何其他班级;然而,它们可以被转换为接口> as
>基础COM组件支持>的QueryInterface调用界面的IID。
>
> Microsoft.MsHtml随应用程序一起复制,所有用户都有
>
>正确安装,因为它是唯一不起作用
>
>有谁知道我必须做什么,使它适用于
>的机器不应该加载Visual Studio,因为它是唯一的区别我可以>弄清楚我的机器和用户机器?
>
>谢谢
>
> Laurent
>
>
> Hello All,
>
>
> I''m currently developing a free windows Scrabble (in french :))
> application
> that uses extensively the WebBrowser class of NET 2.0 for
> configuration,
> and
> data browsing. It works 100% on my machine, with the WebBrowser Class, and > the Microsoft.MsHtml component. I can access all elements on the pages
> through the events, I can change some parts. Everything is rendered
> with
> XSLTs and changing directly the document through the msHtml thing.
>
> But apparently, it works only well on both of my machines :-)
>
> When I deploy the application, Enabling / Disabling controls does not work > and when the application try to access a SelectElement the users got that > error :
> Unable to cast COM object of type ''System.__ComObject'' to class type
> ''mshtml.HTMLSelectElementClass''. COM components that enter the CLR and do > not support IProvideClassInfo or that do not have any interop assembly
> registered will be wrapped in the __ComObject type. Instances of this type > cannot be cast to any other class; however they can be cast to interfaces > as
> long as the underlying COM component supports QueryInterface calls for the > IID of the interface.
>
> The Microsoft.MsHtml is copied with the application and all users have
> a
> correct installation, as it is the only thing that doesn''t work
>
> does anyone knows what I have to do, to make it work on machines that
> shouldn''t be loaded with Visual Studio, as it''s the only difference I can > figure out with my machines and users machines ?
>
> Thank you
>
> Laurent
>
>





这篇关于WebBrowser类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆