Form1.cs 670 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace WindowsFormsTabControl
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18. private void Form1_Load(object sender, EventArgs e)
  19. {
  20. tabControl1.ImageList = imageList1;
  21. tabPage1.ImageIndex = 0;
  22. tabPage1.Text = "选项卡1";
  23. tabPage2.ImageIndex = 0;
  24. tabPage2.Text = "选项卡2";
  25. }
  26. }
  27. }