📄 frm1.frm
字号:
VERSION 5.00
Begin VB.Form frm1
Caption = "frm1"
ClientHeight = 3990
ClientLeft = 60
ClientTop = 450
ClientWidth = 5985
LinkTopic = "Form3"
ScaleHeight = 3990
ScaleWidth = 5985
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "关闭"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4080
TabIndex = 5
Top = 3000
Width = 1575
End
Begin VB.TextBox Text2
Height = 495
Left = 3120
TabIndex = 4
Top = 1920
Width = 1815
End
Begin VB.TextBox Text1
Height = 495
Left = 120
TabIndex = 3
Top = 1920
Width = 1815
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "华氏温度:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 2880
TabIndex = 2
Top = 1440
Width = 1200
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "摄氏温度:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 360
TabIndex = 1
Top = 1440
Width = 1200
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "摄氏-华氏温度转换:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 360
TabIndex = 0
Top = 720
Width = 2280
End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim s As Single, c As Integer, answer As Integer
Private Sub Command1_Click()
Unload Me
Form2.Show
End Sub
Private Sub Text1_Change()
c = Val(Text1.Text)
If Text1.Text = "0" Then
Text2.Text = "32"
ElseIf c > 0 Then
s = (c * 9# / 5) + 32
Text2.Text = Str$(s)
Else
answer = MsgBox("非法数据!", vbOKOnly + vbExclamation, "提示信息")
If answer = vbOK Then
Text1.Text = ""
Text2.Text = ""
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -