home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH11 / 11-1-1.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1998-09-18  |  2.3 KB  |  78 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOxyMor 
  3.    Caption         =   "OXYMORONS"
  4.    ClientHeight    =   2310
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   3570
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   2310
  20.    ScaleWidth      =   3570
  21.    Begin VB.PictureBox picSelected 
  22.       Height          =   495
  23.       Left            =   840
  24.       ScaleHeight     =   435
  25.       ScaleWidth      =   1875
  26.       TabIndex        =   3
  27.       Top             =   1680
  28.       Width           =   1935
  29.    End
  30.    Begin VB.CommandButton cmdAdd 
  31.       Caption         =   "Add an Item"
  32.       Height          =   495
  33.       Left            =   1920
  34.       TabIndex        =   2
  35.       Top             =   120
  36.       Width           =   1215
  37.    End
  38.    Begin VB.ListBox lstOxys 
  39.       Height          =   1260
  40.       Left            =   120
  41.       Sorted          =   -1  'True
  42.       TabIndex        =   0
  43.       Top             =   120
  44.       Width           =   1575
  45.    End
  46.    Begin VB.Label lblDelete 
  47.       Caption         =   "[To delete an item, double-click on it.]"
  48.       Height          =   495
  49.       Left            =   1800
  50.       TabIndex        =   1
  51.       Top             =   840
  52.       Width           =   1695
  53.    End
  54. Attribute VB_Name = "frmOxyMor"
  55. Attribute VB_GlobalNameSpace = False
  56. Attribute VB_Creatable = False
  57. Attribute VB_PredeclaredId = True
  58. Attribute VB_Exposed = False
  59. Private Sub cmdAdd_Click()
  60.   Dim item As String
  61.   item = InputBox("Item to Add:")
  62.   lstOxys.AddItem item
  63. End Sub
  64. Private Sub Form_Load()
  65.   lstOxys.AddItem "jumbo shrimp"
  66.   lstOxys.AddItem "definite maybe"
  67.   lstOxys.AddItem "old news"
  68.   lstOxys.AddItem "good grief"
  69. End Sub
  70. Private Sub lstOxys_Click()
  71.   picSelected.Cls
  72.   picSelected.Print "The selected item is"
  73.   picSelected.Print Chr(34) & lstOxys.Text & Chr(34) & "."
  74. End Sub
  75. Private Sub LstOxys_DblClick()
  76.   lstOxys.RemoveItem lstOxys.ListIndex
  77. End Sub
  78.