Public Enum frmOpen
frmAbout = 0
frmJEMulti = 1
frmJESingle = 2
frmJJMulti = 3
frmJJSingle = 4
frmConvert = 5
End Enum
Public FormBool() As Boolean
----------------------------------
Private Sub Form_Load()
FormBool(frmOpen.frmJJSingle) = True
Frame1.Caption = Me.Caption
End Sub
----------------------------------
每次开某个窗体都一定会跑它的Form_Load()
记录起来就好了
Private Sub Form_Unload(Cancel As Integer)
If FormBool(0) = True Then Unload frmAbout
If FormBool(1) = True Then Unload frmJEMulti
If FormBool(2) = True Then Unload frmJESingle
If FormBool(3) = True Then Unload frmJJMulti
If FormBool(4) = True Then Unload frmJJSingle
End Sub
我这只是为了直接关闭主程式时不会被有些页面卡住
我的附属页面是内嵌在主页面的Frame中
开一个Dialog来仿制MDI Form做成Windows explorer的样式
看你需求吧,每次只讲一小部分谁知道你到底要做啥....