是這樣的吧,不然還要把對應(yīng)關(guān)系放進(jìn)數(shù)組或者數(shù)據(jù)庫?控件再編號對應(yīng)嗎。。。同求思路~
為赤壁等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計(jì)制作服務(wù),及赤壁網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為成都網(wǎng)站制作、網(wǎng)站設(shè)計(jì)、赤壁網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會得到認(rèn)可,從而選擇與我們長期合作。這樣,我們也可以走得更遠(yuǎn)!
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TabControl1.TabPages.Add("aa") /添加一個選項(xiàng)卡
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TabControl1.TabPages.RemoveAt(2) /刪除第二個的選項(xiàng)卡
End Sub
'要使得引用System.Management有效,先通過菜單
'[項(xiàng)目]--[添加引用],在“.Net”選項(xiàng)卡里,選擇“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) = "選項(xiàng)卡名字" Then
bln = True
Exit For
Else
bln = False
End If
Next
If bln = False Then
mytabpage.Name = "tabpages" i
mytabpage.Text = "選項(xiàng)卡名字"
mytabpage.BackColor = Color.White
TabControl1.TabPages.Add(mytabpage)
End If
End Sub
在右側(cè)解決方案資源管理器窗口下右擊工程名,點(diǎn)擊屬性對話框,在出現(xiàn)的界面中點(diǎn)擊應(yīng)用程序選項(xiàng)卡,里面有一個啟動窗體選項(xiàng),你可以自由設(shè)置。
你用的是visual studio 2005 不 如果是那個的話 你在點(diǎn)開窗口---重置窗口布局應(yīng)該就可以了