Vars("Pcode") = "APP001" '页面名称
Vars("Pgrid") = "库才能待办事项" '页面标题
'界面生成
Dim frm As WinForm.Form = Forms("Main")
frm.StopRedraw()
Dim tc As WinForm.TabControl = frm.Controls("TabControl1")
If tc.TabPages.Contains(Vars("Pcode")) = False Then
tc.TabPages.Add(Vars("Pcode"),Vars("Pgrid"))
Else
tc.TabPages(Vars("Pcode")).ClearControl
End If
'------------------------控件添加完成
tc.SelectedPage = tc.TabPages(Vars("Pcode"))
frm.Controls("TabControl1").basecontrol.VisualStyle = 5
frm.ResumeRedraw
' 下面添加窗口1
Dim PB As WinForm.tabcontrol =frm.Controls(vars("pcode"))
'Dim Name As String = e.Link.Name
Forms("窗口1").OPEN(-1000,-1500)
Forms("窗口1").BaseForm.TopLevel = False
Forms("窗口1").BaseForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Forms("窗口1").BaseForm.Dock = System.Windows.Forms.DockStyle.Fill
PB.BaseControl.Controls.Clear
PB.BaseControl.Controls.add(Forms("窗口1").BaseForm)
加了红色的代码 出错了