我的代碼正常工作,直到我想卸載新生成的表單。視覺基本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) –