📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1200
ClientLeft = 60
ClientTop = 360
ClientWidth = 3930
LinkTopic = "Form1"
ScaleHeight = 1200
ScaleWidth = 3930
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "转换"
Height = 495
Left = 2640
TabIndex = 1
Top = 240
Width = 975
End
Begin VB.TextBox Text1
Height = 495
Left = 120
TabIndex = 0
Top = 240
Width = 2175
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'定义变量用来存取华氏温度和设置温度
Dim f As Double
Dim c As Double
'将输入在文本框中的华氏温度存储在变量f中
f = Val(Text1.Text)
'将运算后得到的摄氏温度存储在变量c中
c = (f - 32) * 5 / 9
'输出结果
MsgBox "华氏温度" & Str(f) & "转换为摄氏温度为:" & _
Chr(13) & Str(c)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -