CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: search

  1. #1
    Join Date
    Jun 2008
    Posts
    37

    search

    I'd like to input a url into my textbox then press the button to search the web for the page.
    I odn't know what control to addin what reference i need to make

  2. #2
    Join Date
    Jun 2008
    Posts
    2,477

    Re: search

    What do you want to do with that page exactly? It sounds like you should just tell them to search Google or *maybe* open up their browser. It could be as simple as:


    Code:
    static void Main(string[] args)
    {
        string searchParms = "test";
        string startArgs = String.Format("http://www.google.com/search?hl=en&q={0}", searchParms);
        ProcessStartInfo info = new ProcessStartInfo(@"C:\Program Files\Internet Explorer\iexplore.exe", startArgs);
        Process.Start(info);                 
    }
    I don't know anything about using the Google API, but this will open IE and execute a search for "test". Of course, you should use the default browser, but you must be after soemthing else as this doesn't make much sense...
    Last edited by BigEd781; January 16th, 2009 at 05:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured