Private Sub Command6_Click()
dim xx as integer
xx=5
Dim c2 As New form1
c2.Show
xx = xx - 1
End Sub请问能不能在后一个窗体出现后,前一个cs2隐藏或者卸载,代码怎么写?
dim xx as integer
xx=5
Dim c2 As New form1
c2.Show
xx = xx - 1
End Sub请问能不能在后一个窗体出现后,前一个cs2隐藏或者卸载,代码怎么写?
添加个TIMER控件,Timer1
在Form2窗体出现后,Form1隐藏把Timer1的 Enabled属性设置为False ,Interval属性设置为1000Private Sub Command1_Click()
Form2.Show
Timer1.Enabled = True
End SubPrivate Sub Timer1_Timer()
Timer1.Enabled = False
Form1.Hide
End Sub
Private Sub Command1_Click()
Form2.Show
Form1.Hide
End Sub
差不多,不过延时了一秒钟
例如:
Private Sub Form_Activate()End Sub
例如:
在窗体form加入如下代码
Private Sub Form_Activate()
MsgBox "sss"
End Sub
会在窗体form出现后,弹出一个提示框,这样
我们可利用它来实现一个窗体出现后,前一个窗
体隐藏或者卸载先定义一个全局变量 Public frmUN As Object然后在窗体form加入如下代码 Private Sub Form_Activate()
on error resume next
frmUN.hide
'或 unload frmUN
End SubPrivate Sub Command6_Click()
dim xx as integer
xx=5
set frmUN =me
Dim c2 As New form1
c2.Show
xx = xx - 1
End Sub
即可.
不知为什么??