实现代码:
知识运用:
TabControl控件的ImageList属性 // 获取或设置在控件的选项卡上显示的图像
public ImageList imagelist{ get;set }
和Appearance属性 //获取或设置控件选项卡的可视外观
public TabAppearance Appearance{ get;set; }
实现代码:
private void Form1_Load(object sender, EventArgs e) { tabControl1.ImageList = imageList1; tabPage1.ImageIndex = 0; tabPage1.Text = "人生苦短"; tabPage2.ImageIndex = 1; tabPage2.Text = "惜之若离"; tabControl1.Appearance = TabAppearance.Buttons; }