vb中需要令程序等待一秒后再执行下一语句应使用何种语句?曾经用过特循环实现,但系统资源占用太多且不科学,那位大侠给个指点,谢!是否VB本身就有命令或函数能实现程序等待的?
解决方案 »
- 如何提高PICTUREBOX的单击速度?
- WINSOCK控件UDP方式快速连续地通信时会有堵死和死循环现象发送
- filter 的问题
- 打开word文件时能让里面的宏自动运行吗?
- 软件升级问题(从windows2000升级到windows xp)
- 大容量数据的显示问题
- 急,在線等待,來者有分
- 太奇怪了,还是下午的socket问题:为什么老是说地址在使用或者说所需事物的错误协议或者连接状态
- 物业管理软件源码,有人要吗?
- 求助:如何打印MSFlexGrid中的数据?
- 如何将vb中的一个txt文件转换成xml文件,相当于手工操作时修改后缀名。
- winsock 通信一发数据到服务器就自己关掉了客户端,讨论一下--散分--散分--散分-100
dwMilliseconds
Specifies the time, in milliseconds, for which to suspend execution. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. A value of INFINITE causes an infinite delay.'This project needs a button
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Me.Caption = "Your system will sleep 5 sec."
'Sleep for 5000 milliseconds
Sleep 5000
Me.Caption = ""
End Sub
Private Sub Form_Load()
Me.Caption = ""
Command1.Caption = "Sleep ..."
End Sub
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Me.Caption = "Your system will sleep 5 sec."
'Sleep for 5000 milliseconds
Sleep 5000
Me.Caption = ""
End Sub
Private Sub Form_Load()
Me.Caption = ""
Command1.Caption = "Sleep ..."
End Sub