Adding MSN Serach Textbox in WebBrowser


Place and TextBox in your webbrowser and then place and button and afterthat
on click event of button write code that is shown below:

ArrayList webpages=new ArrayList(); 
private void btnsearch_Click(object sender, EventArgs e)
        {
            WebBrowser thisweb = GetCurrentWebBrowser();
            thisweb.Url = new Uri("http://search.msn.com/results.aspx?FORM=SMCRT&q=" + txtsearch.Text);//search url with MSN
            timer1.Enabled = true;
        }

private WebBrowser GetCurrentWebBrowser()//function to get details of current webpage
        {
            TabPage current_tab = tabControl1.SelectedTab;
            WebBrowser thispasge = (WebBrowser)webpages[tabpages.IndexOf(current_tab)];
            return thispasge;
        }

So like that u can use it easily in your own created web browser and GetCurrentWebBrowser() function is taken for purpose to take of current pages in web browser.

Thanking you
Ebook Download
View all
Learn
View all