一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

windows应用程序版的google搜索引擎源码

时间:2022-07-02 11:34:35 编辑:袖梨 来源:一聚教程网

很多时候感觉用www.google.com搜索网站挺麻烦的,查阅MSDN的知识库后用C#写了这个windows应用程序版的google搜索引擎,主要调用了google开放出来的web service,不过搜索时速度还不是很快,但至少省去了右键[在新窗口中打开]的麻烦,以下是程序的源码,虽然挺长的,不过关键代码并不多,抛砖引玉吧。
//Form1.cs
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;
namespace WindowsApplication2
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ListBox listBox1;
private String sKey;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.textBox2 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();

热门栏目