Hi Akram.19,
Please use TabPage Proprty of TabContrrol which represents a page of the TabControl that can host child controls, then set enable or disable as per your requirement.
Inside the Tab 2 add Panel control and place all the controls inside the Panel.
In Form Load set the Panel Visible property to false.
The on Button click in Tab 1 set the Visible property to true.
Please refer below sample.
Code
C#
private void Form1_Load(object sender, EventArgs e)
{
((TabPage)tabAbout).Enabled = false;
panel1.Visible = false;
}
private void EnableTab(object sender, EventArgs e)
{
tabControl1.SelectedTab = ((TabPage)tabAbout);
((TabPage)tabAbout).Enabled = true;
panel1.Visible = true;
}
VB.Net
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
CType(tabAbout, TabPage).Enabled = False
Panel1.Visible = False
End Sub
Private Sub EnableTab(ByVal sender As Object, ByVal e As EventArgs) Handles btnEnableTab.Click
tabControl1.SelectedTab = (CType(tabAbout, TabPage))
CType(tabAbout, TabPage).Enabled = True
Panel1.Visible = True
End Sub
Screenshot