你好,尼克,我不是很确定,但在VB中你可以关闭一个窗体并将其隐藏
这里有一个类模块调用一个模块,然后模块调用表单,然后表单隐藏,然后表单卸载。如果不卸载表单,它仍会加载到mem中
- Option Explicit
- 'this allows the AcadApplication to be accessable from the form
- Public AcadApp2 As AcadApplication
&039''课堂模块 - Public Sub SLW1(AcadApp As AcadApplication)
-
- SLWal1c AcadApp
- End Sub
&039''模块 - Public Sub SLWal1c(AcadApp As AcadApplication)
- Set AutoCAD_Application = AcadApp
- Set thisdrawing = AutoCAD_Application.ActiveDocument
- Set AcadApp2 = AcadApp
- frmW1.Show vbModal
- End Sub
表单现在对用户开放,并显示
&039''表单 - Private Sub cmdGO_Click()
- Set AutoCAD_Application = AcadApp2
- Set thisdrawing = AutoCAD_Application.ActiveDocument
- frmW1.Hide 'form hidden here
- msgbox "You form is hidden, but still loaded"
- msgbox "Now to unload the form..."
- Unload Me
- End Sub
你可能需要做类似的事情
祝你好运,戴夫 |