home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmInvent
- Caption = "Inventions"
- ClientHeight = 1704
- ClientLeft = 1092
- ClientTop = 1488
- ClientWidth = 3108
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 7.8
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1704
- ScaleWidth = 3108
- Begin VB.ListBox lstInvents
- Height = 624
- Left = 360
- Sorted = -1 'True
- TabIndex = 0
- Top = 120
- Width = 2415
- End
- Begin VB.Label lblWhen
- Height = 255
- Left = 1080
- TabIndex = 4
- Top = 1320
- Width = 1095
- End
- Begin VB.Label lblYear
- Caption = "Year"
- Height = 255
- Left = 360
- TabIndex = 3
- Top = 1320
- Width = 495
- End
- Begin VB.Label lblWho
- Height = 255
- Left = 1080
- TabIndex = 2
- Top = 960
- Width = 2295
- End
- Begin VB.Label lblInventor
- Caption = "Inventor"
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 960
- Width = 735
- End
- Attribute VB_Name = "frmInvent"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- 'In the (Declarations) section of (General)
- Dim inventor(0 To 10) As String
- Dim yr(0 To 10) As Integer
- Private Sub Form_Load()
- Dim what As String, who As String, when As Integer, index As Integer
- Open App.Path & "\INVENTOR.TXT" For Input As #1
- index = 0
- Do While (index < UBound(inventor)) And (Not EOF(1))
- Input #1, what, who, when
- index = index + 1
- lstInvents.AddItem what
- lstInvents.ItemData(lstInvents.NewIndex) = index
- inventor(index) = who
- yr(index) = when
- Loop
- Close #1
- End Sub
- Private Sub lstInvents_Click()
- lblWho.Caption = inventor(lstInvents.ItemData(lstInvents.ListIndex))
- lblWhen.Caption = Str(yr(lstInvents.ItemData(lstInvents.ListIndex)))
- End Sub
-