主题:msgbox未返回前能执行其他语句?
两个按钮,一个 timer
Sub Command1_Click()
MsgBox "clicked."
Print "command1"
End Sub
Sub Form_load()
Timer1 = False
Timer1.Interval = 6000
End Sub
Private Sub Command2_Click()
Print "timer1 6秒后执行,在6秒内点击command1,然后等等"
Timer1 = True
End Sub
Private Sub Timer1_Timer()
MsgBox "time" & Time
Print "timer1"
Timer1 = False
End Sub
当点击了command2后点击command1,按理说没有用doevents 在点确定之前timer1_timer是不会执行的,调试状态下事实也是如此,但编译成exe怎么就不同了?难道exe下是多线程?
Sub Command1_Click()
MsgBox "clicked."
Print "command1"
End Sub
Sub Form_load()
Timer1 = False
Timer1.Interval = 6000
End Sub
Private Sub Command2_Click()
Print "timer1 6秒后执行,在6秒内点击command1,然后等等"
Timer1 = True
End Sub
Private Sub Timer1_Timer()
MsgBox "time" & Time
Print "timer1"
Timer1 = False
End Sub
当点击了command2后点击command1,按理说没有用doevents 在点确定之前timer1_timer是不会执行的,调试状态下事实也是如此,但编译成exe怎么就不同了?难道exe下是多线程?