Here is a tool developed in C# Windows Application which allows you to search on google

based on your query which you give in textbox.

The layout of this tool is :

SearchTool.JPG

Coding:

The coding is almost simple

C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace SearchTool
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
if (queryBox.Text.Trim().Length==0)
{
label1.Text = "Please enter text to search";
return;
}
else
{

string nikhilkumar = "http://www.google.com/search?q=" + queryBox.Text;
webBrowser1.Navigate(nikhilkumar);
}
}

private void button2_Click(object sender, EventArgs e)
{
webBrowser1.GoBack();
}

private void button3_Click(object sender, EventArgs e)
{
webBrowser1.GoForward();

}

private void button4_Click(object sender, EventArgs e){

webBrowser1.GoSearch();
}
}
}

VB.NET

  1. Imports System
  2. Imports System.Collections.Generic
  3. Imports System.ComponentModel
  4. Imports System.Data
  5. Imports System.Drawing
  6. Imports System.Text
  7. Imports System.Windows.Forms
  8. Imports System.IO
  9. Namespace SearchTool
  10. Public Partial Class Form1
  11. Inherits Form
  12. Public Sub New()
  13. InitializeComponent()
  14. End Sub
  15. Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
  16. If queryBox.Text.Trim().Length = 0 Then
  17. label1.Text = "Please enter text to search"
  18. Exit Sub
  19. Else
  20. Dim nikhilkumar As String = "http://www.google.com/search?q=" & queryBox.Text
  21. webBrowser1.Navigate(nikhilkumar)
  22. End If
  23. End Sub
  24. Private Sub button2_Click(ByVal sender As Object, ByVal e As EventArgs)
  25. webBrowser1.GoBack()
  26. End Sub
  27. Private Sub button3_Click(ByVal sender As Object, ByVal e As EventArgs)
  28. webBrowser1.GoForward()
  29. End Sub
  30. Private Sub button4_Click(ByVal sender As Object, ByVal e As EventArgs)
  31. webBrowser1.GoSearch()
  32. End Sub
  33. End Class
  34. End Namespace

Here when you enter any word in Textbox and click on the Search Button the esult will come in the

WebBroswerControl based on the query which you enter in the textbox

Back and Forward Buttons are used used to back and forward you search J

Thanks !