是这样的吧,不然还要把对应关系放进数组或者数据库?控件再编号对应吗。。。同求思路~
为赤壁等地区用户提供了全套网页设计制作服务,及赤壁网站建设行业解决方案。主营业务为成都网站制作、网站设计、赤壁网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TabControl1.TabPages.Add("aa") /添加一个选项卡
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TabControl1.TabPages.RemoveAt(2) /删除第二个的选项卡
End Sub
'要使得引用System.Management有效,先通过菜单
'[项目]--[添加引用],在“.Net”选项卡里,选择“System.Management”,单击[确定]
Imports System.Management
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MySearcher As New ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration")
For Each MySearcherObj As ManagementObject In MySearcher.Get
If CBool(MySearcherObj("IPEnabled")) Then
MsgBox(MySearcherObj("IPAddress")(0))
End If
Next
End Sub
End Class
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
Dim mytabpage As New TabPage
Dim bln As Boolean
For i = 0 To TabControl1.TabPages.Count - 1
If (TabControl1.TabPages(i).Text) = "选项卡名字" Then
bln = True
Exit For
Else
bln = False
End If
Next
If bln = False Then
mytabpage.Name = "tabpages" i
mytabpage.Text = "选项卡名字"
mytabpage.BackColor = Color.White
TabControl1.TabPages.Add(mytabpage)
End If
End Sub
在右侧解决方案资源管理器窗口下右击工程名,点击属性对话框,在出现的界面中点击应用程序选项卡,里面有一个启动窗体选项,你可以自由设置。
你用的是visual studio 2005 不 如果是那个的话 你在点开窗口---重置窗口布局应该就可以了