我的代码正常工作,直到我想卸载新生成的表单。视觉基本6 ::卸载与计时器的飞溅形式
我有2个定时器:: 1为加载飞溅形式和1为卸载飞溅形式。
Option Explicit
Private frmSplash As Form
Private Sub splashForm()
Set frmSplash = New myForm
With frmSplash
.Width = 4000
.Height = 3000
.Caption = "Splash"
End With
frmSplash.Show vbModal
unloadSplash.Enabled = True
End Sub
Private Sub Form_Activate()
Me.Move (Screen.Width - Me.Width)/2, (Screen.Height - Me.Height)/2
splashTimer.Enabled = True
End Sub
Private Sub splashTimer_Timer()
splashForm
End Sub
Private Sub unloadSplash_Timer()
'MsgBox "Am I alive ?"
Unload frmSplash
Set frmSplash = Nothing
unloadSplash.Enabled = False
splashTimer.Enabled = False
End Sub
好像unloadSplash_Timer
splashTimer.Enabled = True
后未启用...
见的解决方案#2这里https://stackoverflow.com/questions/43565625/visual-basic-6-unload-dynamically-created-form –
的可能的复制[Visual Basic 6的::卸货动态创建表格] (http://stackoverflow.com/questions/43565625/visual-basic-6-unload-dynamically-created-form) –