VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "计算机配置"
   ClientHeight    =   3510
   ClientLeft      =   1095
   ClientTop       =   1515
   ClientWidth     =   6120
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   3510
   ScaleWidth      =   6120
   Begin VB.TextBox Text2 
      Height          =   1935
      Left            =   4440
      MultiLine       =   -1  'True
      TabIndex        =   12
      Text            =   "sy07-02.frx":0000
      Top             =   360
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2880
      TabIndex        =   11
      Text            =   "Text1"
      Top             =   480
      Width           =   975
   End
   Begin VB.Frame Frame3 
      Caption         =   "CPU"
      Height          =   1455
      Left            =   120
      TabIndex        =   6
      Top             =   1560
      Width           =   1695
      Begin VB.OptionButton Option3 
         Caption         =   "Celeron"
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   1080
         Width           =   1215
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Pentium II"
         Height          =   375
         Left            =   240
         TabIndex        =   8
         Top             =   600
         Width           =   1335
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Pentium III"
         Height          =   375
         Left            =   240
         TabIndex        =   7
         Top             =   240
         Width           =   1455
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "其它设备"
      Height          =   1455
      Left            =   2280
      TabIndex        =   2
      Top             =   1560
      Width           =   1695
      Begin VB.CheckBox Check3 
         Caption         =   "网络适配器"
         Height          =   375
         Left            =   240
         TabIndex        =   5
         Top             =   960
         Width           =   1335
      End
      Begin VB.CheckBox Check2 
         Caption         =   "Modem"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   600
         Width           =   855
      End
      Begin VB.CheckBox Check1 
         Caption         =   "声卡"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   240
         Width           =   975
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Ok"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4440
      TabIndex        =   1
      Top             =   2520
      Width           =   1095
   End
   Begin VB.ComboBox Combo1 
      Height          =   1260
      Left            =   240
      Style           =   1  'Simple Combo
      TabIndex        =   0
      Text            =   "Combo1"
      Top             =   120
      Width           =   1335
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "内存："
      Height          =   180
      Left            =   2280
      TabIndex        =   10
      Top             =   600
      Width           =   540
   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()
    Text2.Text = ""
    Text2.Text = Combo1.Text
    If Option1.Value Then
        Text2.Text = Text2.Text + vbCrLf + Option1.Caption
    ElseIf Option2.Value Then
        Text2.Text = Text2.Text + vbCrLf + Option2.Caption
    Else
        Text2.Text = Text2.Text + vbCrLf + Option3.Caption
    End If
    Text2.Text = Text2.Text + vbCrLf + Text1.Text
    If Check1.Value = 1 Then
        Text2.Text = Text2.Text + vbCrLf + Check1.Caption
    End If
    If Check2.Value = 1 Then
        Text2.Text = Text2.Text + vbCrLf + Check2.Caption
    End If
    If Check3.Value = 1 Then
        Text2.Text = Text2.Text + vbCrLf + Check3.Caption
    End If
End Sub

Private Sub Form_Load()
    Combo1.AddItem "联想"
    Combo1.AddItem "方正"
    Combo1.AddItem "IBM"
    Combo1.AddItem "Compaq"
    Combo1.AddItem "兼容机"
End Sub

Private Sub Text1_LostFocus()
    Dim str As String
    str = RTrim$(Text1.Text)
    If UCase$(Right$(str, 2)) <> "MB" Then
        Text1.Text = ""
        Text1.SetFocus
        Exit Sub
    End If
    If Not IsNumeric(Left(str, Len(str) - 2)) Then
        Text1.Text = ""
        Text1.SetFocus
        Exit Sub
    End If
End Sub
