Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

I want to create new tab facility in my new Web Browser

$
0
0

I am developing a web browser in C# Visual Studio 2010.

I have used a menu bar(for file, edit etc), toolstrip bar(forward,backward,reload buttons etc) and a web browser object till now.

I want to implement new tab facility.

Will I have to use tab control for this purpose? If yes how can I use it in collaboration with the web browser?
I have already written a code for new tab as:

private void btnNewTab_Click(object sender, EventArgs e)
        {

            TabPage addedTabPage = new TabPage("tab title");
            WebBrowser addedWebBrowser = new WebBrowser()
            {
                Parent = addedTabPage,
                Dock = DockStyle.Fill,
            };
            addedWebBrowser.Navigate("www.google.com");
        }

But as soon I click on the new tab button, the mother form looses focus as if another form or something has got focus but nothing shows up finally.

Thanks


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>