TabPage Constructor ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Initializes a new instance of the TabPage class.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public TabPage()

The following code example creates a TabControl with one TabPage. The TabPage constructor instantiates tabPage1.

Use the System.Drawing and System.Windows.Forms namespaces for this example.

using System.Windows.Forms;

public class Form1 : Form
    private TabControl tabControl1;
    private TabPage tabPage1;

    public void MyTabs()
        this.tabControl1 = new TabControl();

        // Invokes the TabPage() constructor to create the tabPage1.
        this.tabPage1 = new System.Windows.Forms.TabPage();


    public Form1()

    static void Main() 
        Application.Run(new Form1());

.NET Framework
Available since 1.1
Return to top