【VB开源代码栏目提醒】:网学会员鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“Ex2_3.frm”一文,供大家参考学习
VERSION 5.00
Begin VB.Form Ex2_3
Caption = "Form1"
ClientHeight = 2325
ClientLeft = 60
ClientTop = 450
ClientWidth = 3045
LinkTopic = "Form1"
ScaleHeight = 2325
ScaleWidth = 3045
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 390
Left = 1440
TabIndex = 3
Top = 960
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 375
Left = 480
TabIndex = 2
Top = 1560
Width = 1815
End
Begin VB.TextBox Text1
Height = 375
Left = 1440
TabIndex = 1
Top = 360
Width = 1215
End
Begin
VB.Label Label2
Caption = "摄氏温度:"
Height = 255
Left = 240
TabIndex = 4
Top = 960
Width = 975
End
Begin VB.Label Label1
Caption = "华氏温度:"
Height = 255
Left = 240
TabIndex = 0
Top = 480
Width = 975
End
End
Attribute VB_Name = "Ex2_3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'计算温度
Dim f As Single, c As Single
f = Text1.Text
c = 5 * (f - 32) / 9
Text2.Text = c
End Sub