home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frm9_2_2
- Caption = "Three Colleges"
- ClientHeight = 1572
- ClientLeft = 1152
- ClientTop = 2220
- ClientWidth = 5844
- 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 = 1572
- ScaleWidth = 5844
- Begin VB.PictureBox picOutput
- Height = 855
- Left = 120
- ScaleHeight = 804
- ScaleWidth = 5484
- TabIndex = 1
- Top = 600
- Width = 5532
- End
- Begin VB.CommandButton cmdDisplay
- Caption = "Display Colleges"
- Height = 375
- Left = 1800
- TabIndex = 0
- Top = 120
- Width = 1695
- End
- Attribute VB_Name = "frm9_2_2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdDisplay_Click()
- Call DisplayFile
- End Sub
- Private Sub DisplayFile()
- Dim recordNum As Integer
- 'Access the random-access file COLLEGES.TXT
- Dim college As collegeData
- Open App.Path & "\COLLEGES.TXT" For Random As #1 Len = Len(college)
- picOutput.Cls
- picOutput.Print "College"; Tab(30); "State", Tab(45); "Year founded"
- For recordNum = 1 To 3
- Get #1, recordNum, college
- picOutput.Print college.nom; Tab(30); college.state; Tab(45); _
- college.yrFounded
- Next recordNum
- Close #1
- End Sub
-