7个回答
法本信息技术
2024-10-28 广告
2024-10-28 广告
作为深圳市法本信息技术股份有限公司的工作人员,开发软件需经历需求分析、设计、编码、测试和部署等阶段。首先明确软件功能需求,然后进行系统设计,包括模块划分、功能分配等。接着,依据设计进行编码实现,确保代码质量。完成编码后,进行详尽的测试以验证...
点击进入详情页
本回答由法本信息技术提供
展开全部
Dim I As Double
Private Sub Command1_Click()
I = 0
Label2.Caption = ""
Timer2.Enabled = True
End Sub
Private Sub Command2_Click()
Timer2.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Timer2.Interval = 10
Timer2.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Now()
End Sub
Private Sub Timer2_Timer()
I = I + 1
j = I \ 100
k = I Mod 100
Me.Label2.Caption = j & ":" & k & "S"
End Sub
Private Sub Command1_Click()
I = 0
Label2.Caption = ""
Timer2.Enabled = True
End Sub
Private Sub Command2_Click()
Timer2.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Timer2.Interval = 10
Timer2.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Now()
End Sub
Private Sub Timer2_Timer()
I = I + 1
j = I \ 100
k = I Mod 100
Me.Label2.Caption = j & ":" & k & "S"
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Now
End Sub
只需要timer1和label1控件就行了
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Now
End Sub
只需要timer1和label1控件就行了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
秒表:一个标签,两个按钮,一个计时器。
'标签显示时间,按钮一控制秒表,按钮二清零。
Dim m As Integer, s As Integer, ms As Integer, flag As Boolean
Private Sub Command1_Click()
If flag = False Then
Timer1.Interval = 1000
flag = True
Else
Timer1.Interval = 0
flag = False
End If
End Sub
Private Sub Command2_Click()
flag = False
Timer1.Interval = 0
m = 0
s = 0
ms = 0
Label1.Caption = "00:00:00"
End Sub
Private Sub Timer1_Timer()
ms = ms + 1
If ms = 100 Then
s = s + 1
ms = 0
End If
If s = 60 Then
m = m + 1
s = 0
End If
Label1.Caption = Format(m, "00:") & Format(s, "00:") & Format(ms, "00")
End Sub
---------------------------------------------------------------------
显示当天日期和时间:
一个Label控件和timer控件
Private Sub Form1_Load()
Timer1.Interval = 1
Label1.AutoSize = TRUE
Private Sub Timer1_Timer()
Label1.Caption = "现在是:" & date & "的" & time
End Sub
至于显示的文字可以通过设置Label1的Font来改变
'标签显示时间,按钮一控制秒表,按钮二清零。
Dim m As Integer, s As Integer, ms As Integer, flag As Boolean
Private Sub Command1_Click()
If flag = False Then
Timer1.Interval = 1000
flag = True
Else
Timer1.Interval = 0
flag = False
End If
End Sub
Private Sub Command2_Click()
flag = False
Timer1.Interval = 0
m = 0
s = 0
ms = 0
Label1.Caption = "00:00:00"
End Sub
Private Sub Timer1_Timer()
ms = ms + 1
If ms = 100 Then
s = s + 1
ms = 0
End If
If s = 60 Then
m = m + 1
s = 0
End If
Label1.Caption = Format(m, "00:") & Format(s, "00:") & Format(ms, "00")
End Sub
---------------------------------------------------------------------
显示当天日期和时间:
一个Label控件和timer控件
Private Sub Form1_Load()
Timer1.Interval = 1
Label1.AutoSize = TRUE
Private Sub Timer1_Timer()
Label1.Caption = "现在是:" & date & "的" & time
End Sub
至于显示的文字可以通过设置Label1的Font来改变
参考资料: http://zhidao.baidu.com/question/22398229.html?si=3
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
很简单吧,就显示时间~~~
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这么简单,有意找我。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询