DIY searcher with multiple engines

Source: Internet
Author: User

Search engines bring us great convenience, but many search engines have their own characteristics, so we often hope to enter a keyword to get the results provided by multiple search engines. There are a lot of tools in this area, and it is not difficult to make a self-made one. Today we will use VB 6.0 to make a small and exquisite network searcher with independent property rights!

1. Development steps

First, run VB6.0 to create a "Standard EXE" project file, add several Command button controls based on your preferences for search engines based on a text box and a label box.

 

Add the "ShellExecute" function declaration in the Declaration section of the code editing box, and then add the Command button Code. The Code is as follows:

Private Sub commandementclick ()
Dim url As String
'Continue running when an error is encountered
On Error Resume Next

'Enter the search keyword in the text box.
If Text1.Text = "" Then
MsgBox "Enter search keywords first! "," Error! ": Exit Sub
End If

'Call the browser to display Baidu search results
ShellExecute hWnd, "open", "http://www.baidu.com/baidu? Wd = "+ Text1.Text," "," ", 1
End Sub

If you want to add more search engines, you only need to add the Command button and the corresponding code. The code can be added according to the above format. The only change is the URL of the fourth sentence of code, for example, if you add a Google URL, the code is

 

Finally, the searcher with independent property rights will be completed after saving the Compilation Program!

2. Function Expansion

How can I get the search engine code? In fact, there is a simplest way: First open the search engine through IE, enter a few keywords, and click search. Then let's take a look at the IE Address Bar and remove the keyword we enter. The rest is the search engine code. The following table lists the frequently used search engine code tables:

In addition, you can also add the system hotkey instant calling function to this program, so that you can search for the world as you like.

In this example, Windows 2000 and VB6.0 are successfully debugged. Source code and executable programs can be downloaded from http://www.cfan.com.cn/11program/200506/netsearch.zip.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.