Dim t As WinForm.TabControl = e.Form.Controls("TabControl1")
t.TabPages.Add("页面" & Vars("yq"), "页面" & Vars("yq"))
Forms("窗口1g").Controls("TabControl1").SelectedIndex = Vars("yq")
Dim pgn As Integer = t.SelectedIndex
Dim tbl As WinForm.Table
’MessageBox.Show(pgn)
tbl = e.Form.CreateTable("Table" & Vars("yq"), "表A", True)
tbl.SetBounds(10, 10, 600, 400)
e.Form.Controls("TabControl1").Tabpages(pgn).AddControl(tbl)
Vars("yq") += 1