计时系统代码
来源:互联网 发布:美联储非农数据 编辑:程序博客网 时间:2024/06/10 21:34
该段程序是用vb.net实现的。
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim 自定义时间 As New 自定义时间
自定义时间.Show()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Label1.Text = 0 Then
MsgBox("请设置时间!")
Timer1.Enabled = False
Timer2.Enabled = False
Dim 自定义时间 As New 自定义时间
自定义时间.Show()
End If
If Label1.Text > 0 Then
Timer1.Enabled = True
Timer2.Enabled = True
Label3.Text = 60
Label3.Text = Label3.Text - 1
End If
Label1.Text = Label1.Text - 1
when Label1.Text = 0 And Label3.Text = 0
MsgBox("时间到!")
Timer1.Enabled = False
Timer2.Enabled = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label3.Text = Label3.Text - 1
If Label3.Text < 0 Then
Label3.Text = 59
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Label1.Text = Label1.Text - 1
End Sub
End Class
以上是form1的,也就是主窗口的代码。
以下是form2的,也就是弹出窗口的代码
Public Class 自定义时间
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If IsNumeric(Me.TextBox1.Text) Then
Form1.Label1.Text = Me.TextBox1.Text()
Form1.Label1.Text = Form1.Label1.Text
Me.Hide()
Else
MsgBox("请输入正确的时间")
End If
End Sub
End Class
- 计时系统代码
- 计时代码
- 到计时代码
- android秒表计时代码
- JAVA代码运行计时
- OpenCV计时代码段
- 篮球比赛计时计分系统
- 网页自动计时跳转代码
- VB 精确计时类 代码
- 计时收费管理系统 官方
- android计时与系统休眠
- android计时与系统休眠
- c++源代码---停车计时系统
- 计时
- 计时
- 计时
- 计时
- 计时
- pku 2623 sequence median 水题 解题报告
- 内核移植
- Coolite Toolkit 学习笔记一
- 教给你一个永远赚钱的方法
- 东芝科学纪念馆小记
- 计时系统代码
- 关于直流电机 H 桥驱动方案的选择
- 在Ubuntu下录制桌面视频
- 思,春游行
- 深入分析 Linux 内核链表
- 部分对象容器
- 《SQL Server 2005技术内幕:查询、调整和优化》:不太实用的一本书
- 面试后与企业联络技巧
- 我的第一次终于~...