VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 5895 ClientLeft = 60 ClientTop = 345 ClientWidth = 5775 LinkTopic = "Form1" ScaleHeight = 5895 ScaleWidth = 5775 StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmdListCount Caption = "&ListCount" Height = 495 Left = 4080 TabIndex = 15 Top = 4680 Width = 1215 End Begin VB.CommandButton cmdRemoveItem Caption = "&RemoveItem" Height = 495 Left = 4200 TabIndex = 14 Top = 2280 Width = 1215 End Begin VB.CommandButton cmdClearListBox0 Caption = "C&lear" Height = 495 Left = 4080 TabIndex = 13 Top = 3960 Width = 1215 End Begin VB.CommandButton cmdAddName Caption = "&AddItem" Height = 495 Left = 4200 TabIndex = 12 Top = 1560 Width = 1215 End Begin VB.ListBox lstStyle1 Height = 510 ItemData = "frmcis230ch7demo1form1.frx":0000 Left = 120 List = "frmcis230ch7demo1form1.frx":000A Style = 1 'Checkbox TabIndex = 10 Top = 4680 Width = 1455 End Begin VB.ComboBox cboStyle2 Height = 315 ItemData = "frmcis230ch7demo1form1.frx":002B Left = 120 List = "frmcis230ch7demo1form1.frx":0035 Style = 2 'Dropdown List TabIndex = 5 Top = 2400 Width = 1215 End Begin VB.ComboBox cboStyle1 Height = 315 ItemData = "frmcis230ch7demo1form1.frx":0056 Left = 120 List = "frmcis230ch7demo1form1.frx":0060 Style = 1 'Simple Combo TabIndex = 3 Text = "Enter Your Name" Top = 1680 Width = 1335 End Begin VB.ListBox lstStyle0 Height = 450 ItemData = "frmcis230ch7demo1form1.frx":0081 Left = 120 List = "frmcis230ch7demo1form1.frx":008B TabIndex = 1 Top = 3960 Width = 1215 End Begin VB.ComboBox cboStyle0 Height = 315 ItemData = "frmcis230ch7demo1form1.frx":00AC Left = 120 List = "frmcis230ch7demo1form1.frx":00B6 TabIndex = 0 Text = "Gender" Top = 960 Width = 1215 End Begin VB.Label Label9 Caption = "Style = 1 Checkbox" Height = 255 Left = 1680 TabIndex = 11 Top = 4680 Width = 2295 End Begin VB.Label Label6 Caption = "Style = 0 Simple list box" Height = 255 Left = 1680 TabIndex = 9 Top = 4080 Width = 2295 End Begin VB.Label Label5 Caption = "List Boxes" BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 120 TabIndex = 8 Top = 3240 Width = 2895 End Begin VB.Label Label4 Caption = "Combo Boxes" BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 240 TabIndex = 7 Top = 360 Width = 2895 End Begin VB.Label Label3 Caption = "Style = 2 Dropdown list" Height = 255 Left = 2040 TabIndex = 6 Top = 2400 Width = 2295 End Begin VB.Label Label2 Caption = "Style = 1 Simple combo" Height = 375 Left = 2040 TabIndex = 4 Top = 1680 Width = 1935 End Begin VB.Label Label1 Caption = "Style = 0 Dropdown combo box" Height = 255 Left = 2040 TabIndex = 2 Top = 960 Width = 2895 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False ' Ch. 7 Demo Program #1 ' Mr. Minich ' This program illustrates various features of list boxes and combo boxes. Option Explicit Private Sub cmdAddName_Click() cboStyle1.AddItem cboStyle1.Text MsgBox cboStyle1.List(2) End Sub Private Sub cmdClearListBox0_Click() lstStyle0.Clear End Sub Private Sub cmdRemoveItem_Click() cboStyle2.RemoveItem 0 End Sub Private Sub cmdListCount_Click() MsgBox lstStyle1.ListCount End Sub