【发布时间】:2017-04-23 08:02:34
【问题描述】:
在我想卸载新生成的表单之前,我的代码都可以正常工作。
我有 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 stackoverflow.com/questions/43565625/…
标签: forms function timer vb6 basic