我如何才能让一个窗体例(如:Form1),让这个窗体启动后程序自动计时,当该窗体启动300秒后,自动将此窗体unload me了?请教高手指点。最好把代码写详细点。我是新手,汗中...
解决方案 »
- VB程序的善后工作怎么做
- 一个MDI子窗口,怎样可以长期设为最大化,也就是说不能最小化和还原.
- 在线问高手:我用setupfactory打了一个包后,在自己机器(装了vb)上安装没问题,在别的机器(没有vb)上安装却有问题!!
- 初学者题目请教
- 各位怎么处理“多个程序员开发同一系统但源代码不互相覆盖”这个问题的?
- 为什么用winsock传送的文件只有txt文件可以被打开?
- 用代码如何绑定text ado方式
- 请问在不使用窗口上的最大最小化按钮如何进行最大最小化操作?
- 初学者学习VB用什么书好呀
- 谁会刻录CD?帮一把!
- 对于进销存管理,当成本出现异常时,出库应该如何处理呢?
- vb 启动EXCEL 的问题!
dim hprivate sub form_load()
timer1.enabled = true
timer1.interval = 1000
h = 0
End Subprivate sub timer1_timer()
h = h + 1
if h = 3000 then
unload me
end if
end sub
Option ExplicitDim m_nSeconds As IntegerPrivate Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1000
End SubPrivate Sub Timer1_Timer()
m_nSeconds = m_nSeconds + 1
Debug.Print m_nSeconds
If m_nSeconds = 300 Then Unload Me
End Sub
再请教个问题,如何让我的FORM1上显示300秒倒计时。让使用者知道时间快到了?非常感谢
Option ExplicitDim m_nSeconds As IntegerPrivate Sub Form_Load()
Text1.Text = 300
Timer1.Enabled = True
Timer1.Interval = 1000
End SubPrivate Sub Timer1_Timer()
m_nSeconds = m_nSeconds + 1
Text1.Text = 300 - m_nSeconds
If m_nSeconds = 300 Then Unload Me
End Sub