Lab 12 - Files

Structure Chart
Printable Structure Chart
Video clip about Lab 12 (6:10 min)

Grader

For this project you may create your own interface or use the one provided in the Shell folder on the Content tab in Angel. If you use the shell "make it your own" by changing colors, fonts, and/or rearrange the layout.

 

This program will maintain a list file containing information about friends. It will also display the contents of the file when the user requests it. 

Form Load Event

Note: If the program can not open the file because of user input error it will die. This is normally unacceptable but since we have not covered error handling we will not address this problem at this time. Just be sure to enter valid path and filename, including a .txt extension.

   Hints:

                OR

image Object List Box

      and then the Load Event from the  Event List Box

Image of Event List box

………InputBox( “prompt”,”title”, “E:\Friends.txt”)

Add Friend

      Will write the information provided via textboxes to the Friend text file.

An example of the resulting file. Note: Blank lines indicate field values not provided by the user.

image of Friend Text File

   Hints:

Display All

      Will read the Friend file and display the information for all the friends on the form, one friend per line.

Image of Friends list

  Hints:

Form FormClosed Event

  Hints: