用VB的计时器设计一个程序~~

2024-11-07 19:22:30
推荐回答(3个)
回答1:

添加lable控件。timer控件。
代码。
Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
MsgBox("xxxxx,oooo") 'xxxx,你的姓名,oooo你的学号,自己输
End Sub

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Timer1.Interval = 1000
Label1.caption = ""
End Sub

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label1.caption = time
End Sub
说明:label1的字体属性栏自己调,bodesyel属性改成fixed3d

回答2:

Private Sub Form_Load()
Timer1.Interval = 100
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
Label1.Caption = Time
End Sub

回答3:

说的不详细啊