From jacobson@math-cs.cns.uni.edu Wed Jul 10 12:12:29 2002 Date: Wed, 10 Jul 2002 12:12:06 -0500 (CDT) From: Mark Jacobson To: 810-030-01@uni.edu Subject: July 10th class, Friday quiz and assignment... Page 199, Project #2 is due on Friday... We have quiz #3 on Friday (not a midterm exam, just a 20 minute quiz). Here is what we did in class today, which illustrates many of the techniques you need to know in order to do the Friday assignment. I will let you know by email when the Visual Basic is working in the Wright Hall labs. ---------------------------------------------------------------------- ' Written in class on July 10th, 2002 to help students ' with the Project #2, page 199 assignment issues and ' techniques. Dim n As Integer Private Sub cmdAdd_Click() lstDemo.AddItem txtName & " " & txtColor, 1 n = n + 1 lstDemo.RemoveItem 0 lstDemo.AddItem "Number today so far: " & n, 0 End Sub Private Sub cmdClear_Click() txtColor = "" txtName = "" txtName.SetFocus End Sub Private Sub cmdClearListBox_Click() lstDemo.Clear n = 0 lstDemo.AddItem "New list, no items yet." ' Form_Load cmdClear_Click End Sub Private Sub cmdPrintList_Click() frmOutputList.Show For i = 0 To lstDemo.ListCount - 1 Printer.Print lstDemo.List(i) Next i Printer.EndDoc ' Pages 165-166 OF TEXTBOOK End Sub Private Sub Form_Load() n = 0 lstDemo.AddItem "No items added yet." End Sub