vb分类计算时间差
我有8个text控件,分成两组,一组4个分别输入月、日、时、分,然后要计算两组的时间差,输出到label中,谁会做,帮帮忙
补充:要计算出几天几小时几分,是整体的,不是分开计算的
我有8个text控件,分成两组,一组4个分别输入月、日、时、分,然后要计算两组的时间差,输出到label中,谁会做,帮帮忙
补充:要计算出几天几小时几分,是整体的,不是分开计算的
答案:已经为你写好了将以下代码复制到记事本中,另存为Form1.frm
VERSION 5.00
Begin VB.Form Form1
Caption = "计算时间差(by小海)"
ClientHeight = 3810
ClientLeft = 60
ClientTop = 450
ClientWidth = 5835
LinkTopic = "Form1"
ScaleHeight = 3810
ScaleWidth = 5835
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "计算时间差"
Height = 375
Left = 1200
TabIndex = 8
Top = 2760
Width = 1455
End
Begin VB.TextBox Text8
Height = 375
Left = 3000
TabIndex = 7
Top = 1920
Width = 495
End
Begin VB.TextBox Text7
Height = 375
Left = 2400
TabIndex = 6
Top = 1920
Width = 495
End
Begin VB.TextBox Text6
Height = 375
Left = 1800
TabIndex = 5
Top = 1920
Width = 495
End
Begin VB.TextBox Text5
Height = 375
Left = 1200
TabIndex = 4
Top = 1920
Width = 495
End
Begin VB.TextBox Text4
Height = 375
Left = 3000
TabIndex = 3
Top = 840
Width = 495
End
Begin VB.TextBox Text3
Height = 375
Left = 2400
TabIndex = 2
Top = 840
Width = 495
End
Begin VB.TextBox Text2
Height = 375
Left = 1800
TabIndex = 1
Top = 840
Width = 495
End
Begin VB.TextBox Text1
Height = 375
Left = 1200
TabIndex = 0
Top = 840
Width = 495
End
Begin VB.Label Label2
Caption = "月 日 时 分"
Height = 255
Left = 1200
TabIndex = 10
Top = 1560
Width = 2535
End
Begin VB.Label Label1
Caption = "月 日 时 分"
Height = 255
Left &n