本文整理匯總了C#中System.Windows.Forms.TabPage類的典型用法代碼示例。如果您正苦於以下問題:C# TabPage類的具體用法?C# TabPage怎麽用?C# TabPage使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TabPage類屬於System.Windows.Forms命名空間,在下文中一共展示了TabPage類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: MyTabs
//引入命名空間
using System.Drawing;
using System.Windows.Forms;
public class Form1 : Form
{
private TabControl tabControl1;
// Declares tabPage1 as a TabPage type.
private System.Windows.Forms.TabPage tabPage1;
private void MyTabs()
{
this.tabControl1 = new TabControl();
// Invokes the TabPage() constructor to create the tabPage1.
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabControl1.Controls.AddRange(new Control[] {
this.tabPage1});
this.tabControl1.Location = new Point(25, 25);
this.tabControl1.Size = new Size(250, 250);
this.ClientSize = new Size(300, 300);
this.Controls.AddRange(new Control[] {
this.tabControl1});
}
public Form1()
{
MyTabs();
}
static void Main()
{
Application.Run(new Form1());
}
}