尝试在我的应用程序中加载Dictionary.com时显示错误 [英] Error displayed when trying to load Dictionary.com in my application

查看:72
本文介绍了尝试在我的应用程序中加载Dictionary.com时显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是visual basic 6的初学者,我在创建应用程序时需要帮助。我正在尝试在visual basic 6中创建一个应用程序,它将显示单击搜索按钮时在文本框中输入的单词(来自站点Dictionary.com)的含义。它实际上是一个Web浏览器,它打开包含所需单词含义的页面。任何人都可以给我搜索按钮的代码,这样在文本框中输入所需的单词并单击搜索按钮后,它将打开包含该单词含义的Dictionary.com页面。我尝试了很多方法,但每次在加载页面时都显示一些错误或另一个错误。例如:



< img src =http://i.imgur.com/ K7YAnfj.jpgtitle =由imgur.com主办/>



我用于搜索按钮的代码:

 私有  Sub  Command1_Click()

WebBrowser1.Navigate( http://dictionary.reference.com/browse/& ; Text1.Text)

结束 Sub





或者我还能做些什么来消除错误?

解决方案

Visual Basic 6 ?你确定吗?

为什么你自己这样做? :(



多年来不再支持它了。



您有错误消息说页面上的脚本存在问题;显然您的Web浏览器控件无法处理dictionary.com网站页面上的脚本。很难说更有用,因为您没有提供足够的上下文信息。也许尝试改进您的问题;但是对于VB 6,它将是某种难以找到的答案。

祝你好运。


我自己解决了这个问题。我添加了以下代码到表单加载事件:

 WebBrowser1.Silent =  True  


I am a beginner in visual basic 6 and i need help in creating an application. I am trying to create an application in visual basic 6 which would display the meaning of a word(from the site Dictionary.com) entered in the text box on clicking on the "Search" button. It is actually a web browser which opens the page which contains the meaning of the desired word. Can anyone give me the code for the "Search" button such that after typing in the desired word in the text box and clicking on the "Search" button it would open the Dictionary.com page containing the meaning of that word. I have tried numerous methods but every time it is displaying some error or the other in loading the page. Example:

<img src="http://i.imgur.com/K7YAnfj.jpg" title="Hosted by imgur.com" />

The code which I used for the search button:

Private Sub Command1_Click()

WebBrowser1.Navigate ("http://dictionary.reference.com/browse/" & Text1.Text)

End Sub



Or is there anything else that I can do to remove the error?

解决方案

Visual Basic 6? Are you sure?
Why do you do that to yourself? :(

It is not supported anymore for many years now.

You have an error message saying there's a problem in a script on the page ; apparently your web browser control cannot handle a script on the page of dictionary.com's website. Hard to say anything more useful since you did not feed us with enough contextual information. Maybe try to improve your question ; but with VB 6, it will be some kind of hard to find answers.
Good luck.


I have solved the problem myself. I added the following code to the form load event:

WebBrowser1.Silent = True


这篇关于尝试在我的应用程序中加载Dictionary.com时显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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