VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3825
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4980
   LinkTopic       =   "Form1"
   ScaleHeight     =   3825
   ScaleWidth      =   4980
   StartUpPosition =   3  '窗口缺省
   Begin VB.ListBox List1 
      Height          =   2040
      ItemData        =   "v6j07-04.frx":0000
      Left            =   3240
      List            =   "v6j07-04.frx":0002
      TabIndex        =   11
      Top             =   960
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "OK"
      Height          =   375
      Left            =   3240
      TabIndex        =   10
      Top             =   360
      Width           =   1215
   End
   Begin VB.Frame Frame2 
      Height          =   1575
      Left            =   360
      TabIndex        =   6
      Top             =   2160
      Width           =   2415
      Begin VB.OptionButton Option2 
         Caption         =   "Windows 98"
         Height          =   255
         Left            =   360
         TabIndex        =   9
         Top             =   1080
         Width           =   1575
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Windows 2000 "
         Height          =   255
         Left            =   360
         TabIndex        =   8
         Top             =   720
         Width           =   1575
      End
      Begin VB.CheckBox Check2 
         Caption         =   "操作系统"
         Height          =   255
         Left            =   360
         TabIndex        =   7
         Top             =   240
         Width           =   1095
      End
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   1200
      TabIndex        =   2
      Top             =   1320
      Width           =   1215
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "v6j07-04.frx":0004
      Left            =   1200
      List            =   "v6j07-04.frx":000E
      TabIndex        =   1
      Text            =   "Combo1"
      Top             =   840
      Width           =   1215
   End
   Begin VB.CheckBox Check1 
      Caption         =   "计算机"
      Height          =   495
      Left            =   600
      TabIndex        =   0
      Top             =   360
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Height          =   1695
      Left            =   360
      TabIndex        =   3
      Top             =   240
      Width           =   2415
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "数量："
         Height          =   180
         Left            =   240
         TabIndex        =   5
         Top             =   1080
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "品牌："
         Height          =   180
         Left            =   240
         TabIndex        =   4
         Top             =   720
         Width           =   540
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()
Combo1.Enabled = Not Combo1.Enabled
Text1.Enabled = Not Text1.Enabled

End Sub

Private Sub Check2_Click()
Option1.Enabled = Not Option1.Enabled
Option2.Enabled = Not Option2.Enabled

End Sub

Private Sub Combo1_LostFocus()
' 当焦点离开组合框时组合框的LostFocus事件被触发，利用该事件过程将用户输入的计算机品牌添加到组合框中。
' 添加到组合框的新项目不能永久保存，下次运行该程序中看不到上次保存的项目。
flag = False
For i = 0 To Combo1.ListCount - 1
If Combo1.List(i) = Combo1.Text Then
flag = True
Exit For
End If
Next
If Not flag Then
Combo1.AddItem Combo1.Text
End If
End Sub

Private Sub Command1_Click()
If Check1.Value = 1 Then
List1.AddItem Combo1
List1.AddItem Text1
End If
If Check2.Value = 1 Then
If Option1 Then
List1.AddItem "Windows 2000"
Else
List1.AddItem "Windows 98"
End If
End If
End Sub

Private Sub Form_Load()
' Combo1中的选项已在设计状态通过List属性设计
Combo1.Enabled = False
Text1.Enabled = False
Option1.Enabled = False
Option2.Enabled = False

End Sub
