Web浏览器控件 [英] Web Browser Control
问题描述
我正在使用网页浏览器控件..,我想在
运行时添加控件...
我正在添加网页浏览器控制在设计时。现在我决定在运行时添加
控件,所以我从表单中删除了控件以及
对AxSHDocVw和SHDocVw的参考,然后我添加了以下语句
Dim axwbOfficeDocEditor As New AxSHDocVw.AxWebBrowser
Me.Controls.Add(axwbOfficeDocEditor)
axwbOfficeDocEditor.Dock = DockStyle.Fill
我收到以下错误,
类型''AxSHDocVw.AxWebBrowser''未定义。
什么我错过了吗?我不能在运行时添加webbrowser控件吗?
VJ
I am using the web browser control.., I would like to add the control at
runtime...
I was adding the web browser control at desgin time. Now I decided to add
the control at run time so I removed the control from the form and also the
refrences to AxSHDocVw and SHDocVw, then I added the following statments
Dim axwbOfficeDocEditor As New AxSHDocVw.AxWebBrowser
Me.Controls.Add(axwbOfficeDocEditor)
axwbOfficeDocEditor.Dock = DockStyle.Fill
I get the following error,
Type ''AxSHDocVw.AxWebBrowser'' is not defined.
What am I missing?? Can''t I add the webbrowser control at run-time?
VJ
推荐答案
你好VJ 。
错误很明显:在您的代码中,没有包含web浏览器的.dll
的引用。对象。
您只需添加Web浏览器即可。组件到您的工具箱。从
主菜单:
工具 - >添加/删除工具箱项目 - > [tab] COM组件
并选择 Microsoft Web Browser从列表中。然后确认,你的工具箱中会有一个
浏览器组件。只需拖放到您的应用程序中即可。
再见
Francesco
http://www.chantive.it/simplog/
" VJ" < 6 ******** @ yahoo.com> ha scritto nel messaggio
新闻:Oz **************** @ tk2msftngp13.phx.gbl ...
Hi VJ.
The error is obvious: there isn''t, in your code, a reference to the .dll
containing the "web browser" object.
You can simply add the "Web Browser" component to your toolbox. From the
main menu:
Tools->Add/Remove Toolbox Items->[tab]COM Components
and choose "Microsoft Web Browser" from the list. Then confirm and you''ll
have a
browser component in your toolbox. Just drag and drop into your application.
Bye
Francesco
http://www.chantive.it/simplog/
"VJ" <vi********@yahoo.com> ha scritto nel messaggio
news:Oz****************@tk2msftngp13.phx.gbl...
我是使用Web浏览器控件..,我想在运行时添加控件...
我在设计时添加了Web浏览器控件。现在我决定在运行时添加控件,所以我从表单中删除了控件,并将
引用到了AxSHDocVw和SHDocVw,然后我添加了以下语句
Dim axwbOfficeDocEditor As New AxSHDocVw.AxWebBrowser
Me.Controls.Add(axwbOfficeDocEditor)
axwbOfficeDocEditor.Dock = DockStyle.Fill
我收到以下错误,
输入'' AxSHDocVw.AxWebBrowser''未定义。
我错过了什么?我不能在运行时添加web浏览器控件吗?
VJ
I am using the web browser control.., I would like to add the control at
runtime...
I was adding the web browser control at desgin time. Now I decided to add
the control at run time so I removed the control from the form and also the refrences to AxSHDocVw and SHDocVw, then I added the following statments
Dim axwbOfficeDocEditor As New AxSHDocVw.AxWebBrowser
Me.Controls.Add(axwbOfficeDocEditor)
axwbOfficeDocEditor.Dock = DockStyle.Fill
I get the following error,
Type ''AxSHDocVw.AxWebBrowser'' is not defined.
What am I missing?? Can''t I add the webbrowser control at run-time?
VJ
*" VJ" ; < 6 ******** @ yahoo.com> scripsit:
* "VJ" <vi********@yahoo.com> scripsit:
我正在使用网页浏览器控件..,我想在运行时添加控件...
我正在添加网页浏览器在设计时控制。现在我决定在运行时添加控件,所以我从表单中删除了控件以及对AxSHDocVw和SHDocVw的参考,然后我添加了以下语句
Dim axwbOfficeDocEditor As New AxSHDocVw.AxWebBrowser
Me.Controls.Add(axwbOfficeDocEditor)
axwbOfficeDocEditor.Dock = DockStyle.Fill
我收到以下错误,
输入'' AxSHDocVw.AxWebBrowser''未定义。
我错过了什么?我不能在运行时添加webbrowser控件吗?
I am using the web browser control.., I would like to add the control at
runtime...
I was adding the web browser control at desgin time. Now I decided to add
the control at run time so I removed the control from the form and also the
refrences to AxSHDocVw and SHDocVw, then I added the following statments
Dim axwbOfficeDocEditor As New AxSHDocVw.AxWebBrowser
Me.Controls.Add(axwbOfficeDocEditor)
axwbOfficeDocEditor.Dock = DockStyle.Fill
I get the following error,
Type ''AxSHDocVw.AxWebBrowser'' is not defined.
What am I missing?? Can''t I add the webbrowser control at run-time?
完成这些步骤后,您可以:
311303 WebOCHostVB.exe在Visual Basic .NET中承载WebBrowser控件
< URL:http://support.microsoft.com/?id = 311303>
-
Herfried K. Wagner [MVP]
< URL:http://dotnet.mvps.org/>
You can, after you completed these steps:
311303 WebOCHostVB.exe Hosts the WebBrowser Control in Visual Basic .NET
<URL:http://support.microsoft.com/?id=311303>
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
你的姓氏是Balena????
Is your last name "Balena"????
这篇关于Web浏览器控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!