VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   5565
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   9180
   LinkTopic       =   "Form1"
   ScaleHeight     =   5565
   ScaleWidth      =   9180
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "计算"
      Height          =   615
      Left            =   2040
      TabIndex        =   4
      Top             =   4560
      Width           =   2175
   End
   Begin VB.TextBox Text2 
      Height          =   735
      Left            =   2520
      TabIndex        =   1
      Top             =   2280
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   735
      Left            =   2520
      TabIndex        =   0
      Top             =   840
      Width           =   1695
   End
   Begin VB.Label Label2 
      Caption         =   "体重"
      Height          =   255
      Left            =   1560
      TabIndex        =   3
      Top             =   2520
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "身高"
      Height          =   375
      Left            =   1560
      TabIndex        =   2
      Top             =   1080
      Width           =   735
   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 h As Single, y As Single
Dim b As Single, c As Single
h = Val(Text1.Text)
y = Val(Text2.Text)
b = h - 100
c = (y - b) / b
Select Case c
   Case Is > 0.2
   MsgBox "肥胖！"
   Case Is > 0.1 And c <= 0.2
   MsgBox "超重！"
   Case Else
   MsgBox "正常！"
   End Select
   
End Sub
