Dim tbc As WinForm.TabControl = Forms("主窗口").Controls("TabControl1")
Dim e As Object = Args(0)
Dim Sender As Object = Args(1)
Select Case Sender
Case "窗体1","窗体2"
For Each tbp As WinForm.TabPage In tbc.TabPages
If tbp.Name = Sender Then
tbc.SelectedPage = tbp
Return Nothing
End If
Next
Forms("主窗口").StopRedraw
forms("加载窗口").Open
Forms("加载窗口").Controls("Label1").Text = "正在加载数据,请稍候......."
Application.DoEvents()
tbc.TabPages.Add(Sender,Sender)
Dim frm = Forms(Sender)
frm.OPEN(-1000,-1500)
frm.BaseForm.TopLevel = False '窗口降级
frm.BaseForm.Dock = Windows.Forms.DockStyle.fill
frm.BaseForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
tbc.TabPages(Sender).Controls.add(frm.BaseForm)
tbc.SelectedIndex = tbc.TabPages.Count-1
tbc.SelectedPage.Image = getimage(ProjectPath & "Images\logo2.ico")
Forms("加载窗口").Controls("Label1").Text = "加载完毕....."
Forms("加载窗口").Close
Forms("主窗口").ResumeRedraw
这个代码有啥问题 打开 forms("加载窗口").Open 后一直关闭不了 下面的代码不执行了.