Dim tab As WinForm.TabControl = e.Form.Controls("TabControl1") If tab.TabPages("订单窗口" ) IsNot Nothing Then tab.SelectedPage = tab.TabPages("订单窗口") Else Dim Name As String = "订单窗口" tab.TabPages.Add(name,name) Dim pb = tab.BaseControl Forms(Name).OPEN(-1000,-1500) Forms(Name).BaseForm.TopLevel = False Forms(Name).BaseForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Forms(Name).BaseForm.Dock = System.Windows.Forms.DockStyle.Fill PB.TabPages(name).Controls.Clear PB.TabPages(name).Controls.add(Forms(Name).BaseForm) tab.SelectedPage = tab.TabPages(name) tab.Select Sendkeys.Send("{tab}") End If
|