软件开发VB

来源:百度知道 编辑:UC知道 时间:2024/05/21 22:14:18
VB的时间控件。。怎么才能实现3秒过后自动跳到上一个界面或窗口。请各位大侠给我写个详细的代码吧。。麻烦大家了。

'窗体一代码如下:
Private Sub Command1_Click()
Form2.Show
Timer1.Enabled = False
Me.Hide
判断 = Me.Caption
End Sub

Private Sub Command2_Click()
Form3.Show
Timer1.Enabled = False
Me.Hide
判断 = Me.Caption
End Sub

Private Sub Form_Load()
Command1.Caption = "打开窗体2"
Command2.Caption = "打开窗体3"
Timer1.Enabled = True
Timer1.Interval = 3000
End Sub

Private Sub Timer1_Timer()
Select Case 判断
Case "Form2"
Form2.Show
Case "Form3"
Form3.Show
End Select
Timer1.Enabled = False
Me.Hide
End Sub

'窗体二
Private Sub Command1_Click()
Form1.Show
Timer1.Enabled = False
Me.Hide
判断 = Me.Caption
End Sub

Private Sub Command2_Click()
Form3.Show
Timer1.Enabled = False
Me.Hide
判断 = Me.Caption
End Sub

Private Sub Form_Load()
Com