Search in Address Bar

tonyr1988
07-18-2003, 06:13 PM
I'm trying to mimic Opera's "search in Address Bar" thing. I doubt that that makes any sense to non-Opera users. Here's an example:

If you type in "g Visual Basic" into the Address Bar and hit enter, then it will search Google for Visual Basic. Some other ones: "a Visual Basic" would search AllTheWeb for Visual Basic, "l Visual Basic" would search Lycos, z would search Amazon.com, e would search Ebay.com, etc.

The only part that I haven't figured out is how to detect this. Is there an effective way to do this in Visual Basic? Thanks in advance, and I hope that my post is somewhat clear. If not, just ask questions.

Until next time, take care and God Bless!
-Tony

Squishy
07-18-2003, 06:23 PM
Insert into whatever triggers the navigate event

Select Case LCase(Left(textURL.text, 2))
Case "g "
' search google with Right(textURL.text, Len(textURL) - 2)
Case "etc..."

Case Else
WebBrowser1.Navigate textURL.text
End Select

tonyr1988
07-18-2003, 06:40 PM
1. What does the Right(textURL.text, Len(textURL)-2) do?

2. How can I remove the first two characters from the URL before I search it? [I don't want "g " to be in the search]

Until next time, take care and God Bless!
-Tony

Squishy
07-18-2003, 06:43 PM
1 - Read on
2 - Thats what 1 does

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum