VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "温度转换"
   ClientHeight    =   1755
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4110
   LinkTopic       =   "Form1"
   ScaleHeight     =   1755
   ScaleWidth      =   4110
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "摄氏转"
      Height          =   495
      Left            =   2400
      TabIndex        =   3
      Top             =   1080
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "华氏转"
      Height          =   495
      Left            =   600
      TabIndex        =   2
      Top             =   1080
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   2160
      TabIndex        =   1
      Top             =   360
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   480
      TabIndex        =   0
      Top             =   360
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "摄氏温度"
      Height          =   375
      Left            =   2520
      TabIndex        =   5
      Top             =   120
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "华氏温度"
      Height          =   375
      Left            =   840
      TabIndex        =   4
      Top             =   120
      Width           =   975
   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!, c!                          '使用变量
  f = Text1
  c = 5 / 9 * (f - 32)
  Text2 = c
End Sub
Private Sub Command2_Click()
  Text1 = 9 / 5 * Val(Text2) + 32    '不使用变量，直接使用文本框
End Sub
 
