Hi HondaCop,
It would be helpful if you share your solution here. It will help other communities to solve their problem. Below is what I am doing now.
Code Block
TabControlP
public partial class Form2 : Form
{
TabPage tabPage1;
TabPage tabPage2;
WebBrowser webBrowser1;
Button bt;
public Form2()
{
InitializeComponent();
tabPage1 = new TabPage("tabPage1");
tabPage2 = new TabPage("tabPage2");
this.tabControl1.TabPages.AddRange(new TabPage[] { tabPage1, tabPage2 });
bt = new Button();
bt.Location = new Point(20, 50);
bt.Text = "Home";
this.tabPage1.Controls.Add(bt);
bt.Click += new EventHandler(bt_Click);
webBrowser1 = new WebBrowser();
webBrowser1.Dock = DockStyle.Fill;
this.tabPage2.Controls.Add(this.webBrowser1);
}
void bt_Click(object sender, EventArgs e)
{
this.webBrowser1.Navigate("http://www.microsoft.com");
}
}
Thanks. Rong-Chun Zhang |