form1.cs
来自「Sams Teach Yourself C# Web Programming i」· CS 代码 · 共 114 行
CS
114 行
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace Tabs_Example
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class fclsTabs : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabMyTabs;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public fclsTabs()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tabMyTabs = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabMyTabs.SuspendLayout();
this.SuspendLayout();
//
// tabMyTabs
//
this.tabMyTabs.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabPage1,
this.tabPage2});
this.tabMyTabs.Location = new System.Drawing.Point(8, 16);
this.tabMyTabs.Name = "tabMyTabs";
this.tabMyTabs.SelectedIndex = 0;
this.tabMyTabs.Size = new System.Drawing.Size(272, 208);
this.tabMyTabs.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(264, 182);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Contacts";
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(264, 182);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Appointments";
//
// fclsTabs
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabMyTabs});
this.Name = "fclsTabs";
this.Text = "Tabs Example";
this.tabMyTabs.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new fclsTabs());
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?