Dim MaxVal As String = Args(0) Dim tabc As WinForm.TabControl tabc= Forms("菜单").Controls("TabControl1") For a As Integer=0 To tabc.TabPages.Count-1 If tabc.TabPages(a).Text=MaxVal Then tabc.SelectedIndex=a Exit For End If Next 'Dim MaxVal As String ="搜索匹配" If tabc.TabPages(tabc.SelectedIndex).Text <> MaxVal tabc.tabpages.add(MaxVal,MaxVal) Dim pb=tabc.basecontrol Forms(MaxVal).open(-1000,-1500) Forms(MaxVal).BaseForm.TopLevel=False Forms(MaxVal).BaseForm.FormBorderStyle=System.Windows.Forms.FormBorderStyle.None Forms(MaxVal).BaseForm.Dock=System.Windows.Forms.DockStyle.Fill pb.TabPages(MaxVal).Controls.Clear pb.TabPages(MaxVal).Controls.add(Forms(MaxVal).BaseForm) tabc.SelectedPage=tabc.TabPages(MaxVal) tabc.Select End If Return Nothing