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