The Pizza Project

If you wish, you can read the list of toppings in from a file instead of adding them to the collection for the checked list box:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim s As String
        Me.ChkLstToppings.Items.Clear() 'remove all of the existing toppings
        FileOpen(1, "C:\zebra0.com\resources\toppings.txt", OpenMode.Input) 'open the file for input
        While Not EOF(1) 'EOF=End of file, this loops to read all lines in the file
            s = LineInput(1) 'read from file 1
            Me.ChkLstToppings.Items.Add(s) 'add the item read to the combo box
        End While
        FileClose(1) 'close file 1
    End Sub

To Do:

  • Add the size extra large
  • Add a menu with an about box
  • Add print preview and print to the project

You learn as you experiment and refine the project. Don't be afraid to add additional refinements to this project.

NEXT: Connecting to a Database in Visual Basic