在vb中如何有一个text,一个timer和一个command编写一个程序,打点击command时,text中的显示为时间变化,

[复制链接]
查看11 | 回复2 | 2011-6-1 21:54:16 | 显示全部楼层 |阅读模式
例如:timer的interval属性为1000时,text中的显示为按秒逐步显示····

回复

使用道具 举报

千问 | 2011-6-1 21:54:16 | 显示全部楼层
Private Sub Command1_Click()
Timer1.Interval = 1000
Timer1.Enabled = TrueEnd SubPrivate Sub Form_load()
Timer1.Enabled = FalseEnd SubPrivate Sub Timer1_Timer()
Static a As Long
Static b As Long
Static c As Long
a = a + 1
If a > 59 Then
a = 0
b = b + 1
ElseIf b > ...
回复

使用道具 举报

千问 | 2011-6-1 21:54:16 | 显示全部楼层
Private Sub Command1_Click()
Timer1.Interval = 1000
Timer1.Enabled = TrueEnd SubPrivate Sub Form_Unload(Cancel As Integer)
Timer1.Enabled = FalseEnd SubP...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行