www.pudn.com > 电话费计算1.rar > Form1.frm, change:2004-11-15,size:4450b
VERSION 5.00
Begin VB.Form Form1
Caption = "计算电话费"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Interval = 1000
Left = 360
Top = 1200
End
Begin VB.CommandButton Command1
Caption = "拨打"
Height = 375
Left = 120
TabIndex = 10
Top = 360
Width = 1215
End
Begin VB.TextBox Text2
Height = 495
Left = 3240
TabIndex = 1
Top = 1080
Width = 1335
End
Begin VB.TextBox Text1
Height = 495
Left = 3240
TabIndex = 0
Top = 240
Width = 1335
End
Begin VB.Label Label10
Caption = "元"
Height = 375
Left = 3480
TabIndex = 12
Top = 2520
Width = 375
End
Begin VB.Label Label9
Caption = "秒"
Height = 255
Left = 1560
TabIndex = 11
Top = 2640
Width = 255
End
Begin VB.Label Label8
Height = 375
Left = 2520
TabIndex = 9
Top = 2520
Width = 615
End
Begin VB.Label Label7
Height = 375
Left = 960
TabIndex = 8
Top = 2520
Width = 375
End
Begin VB.Label Label6
Caption = "hh:mm:ss"
Height = 255
Left = 2280
TabIndex = 7
Top = 1440
Width = 975
End
Begin VB.Label Label5
Caption = "通话结束"
Height = 255
Left = 2160
TabIndex = 6
Top = 1080
Width = 975
End
Begin VB.Label Label4
Caption = "hh:mm:ss"
Height = 255
Left = 2280
TabIndex = 5
Top = 600
Width = 855
End
Begin VB.Label Label3
Caption = "通话开始"
Height = 255
Left = 2280
TabIndex = 4
Top = 240
Width = 855
End
Begin VB.Label Label2
Caption = "通话时间"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 3
Top = 2040
Width = 975
End
Begin VB.Label Label1
Caption = "通话费用"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3000
TabIndex = 2
Top = 1920
Width = 975
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a As Integer
Dim b As Integer
Private Sub Command1_Click()
a = -a
If a = -1 Then
Command1.Caption = "结束"
Text1.Text = Time
Text2.Text = ""
Else: Command1.Caption = "开始"
Text2.Text = Time
Label8.Caption = Int(b / 60 + 1) * 0.3
b = 0
End If
End Sub
Private Sub Form_Load()
a = 1
End Sub
Private Sub Timer1_Timer()
If a = -1 Then
Label7.Caption = b + 1
b = b + 1
End If
End Sub