Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
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:
VB
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?
Posted
Updated 22-Oct-13 8:47am
v3

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.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-Oct-13 15:40pm    
Agree. I don't quite understand why people want to torture themselves. Just out of laziness to learn or read anything?
I have only one note: VB6 was obsolete event before it was first introduced to marked. Some technologies created a decade or so before was way more robust and generally serious. No wonder VB6 gained so much popularity: certain wide category of people are attracted by such fulleries, pretty much by the reasons similar to those bringing other people to fortune tellers or into multilevel marketing... Sad...
My 5, by the way.
—SA
phil.o 22-Oct-13 15:54pm    
Thank you Sergey :)
As an IT worker for many years now, I sometimes have to treat some plain old VB 6 applications compatibility problems. An effective number of small companies still have their digital informations - sales, stocks, management - in such somewhat hand-cooked applications. 'This is now time to think about another more recent solution' is the response that often comes ^^
Sergey Alexandrovich Kryukov 22-Oct-13 16:02pm    
Dealing with legacy was always unpleasant and not easy, and VB6 legacy is especially massive and troublesome overall. Hope you will successfully phase out this one from your life, with time...
—SA
phil.o 22-Oct-13 16:05pm    
I have a board next to me ; everytime I manage to get rid of a VB6 solution, I draw a line ; i group the lines by six, and the seventh line crosses them in diagonal.
Sergey Alexandrovich Kryukov 22-Oct-13 16:16pm    
Great, this is like cutting a notch on the stock of your sniper's firearm when you kill a next one. :-)
—SA
I have solved the problem myself. I added the following code to the form load event:
VB
WebBrowser1.Silent = True
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900