//将antopostback属性设为TRUE
//在TabStrip1_SelectedIndexChange事件中写
TabStrip1.TabIndex=System.Convert.ToInt16(TabStrip1.SelectedIndex);
TextBox1.Text=TabStrip1.TabIndex.ToString();
本文介绍了如何在WindowsForms编程中,设置TabControl的antopostback属性为True,并在TabStrip1_SelectedIndexChange事件中更新TextBox1的文本,显示当前选中的Tab页索引。
//将antopostback属性设为TRUE
//在TabStrip1_SelectedIndexChange事件中写
TabStrip1.TabIndex=System.Convert.ToInt16(TabStrip1.SelectedIndex);
TextBox1.Text=TabStrip1.TabIndex.ToString();

被折叠的 条评论
为什么被折叠?