Date: Fri, 20 Sep 2002 16:15:18 -0500 (CDT) From: Mark Jacobson To: 810-030-01@uni.edu Subject: Quiz #1 Visual Basic on Monday.... September 2002 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Hi Visual Basic students, Reminder: Quiz #1 on Monday, September 23rd. URL: http://www.cns.uni.edu/~jacobson/c030.html There is a practice quiz available, linked to from c030.html page. The main properties of the Vertical Scroll Bar control are: .Value <------ Default property .Max .Min .SmallChange .LargeChange .Value is the default property for a vertical scroll bar. The three vertical scroll bars we used in today's hands-on lab class were named: vsbRed vsbGreen and vsbBlue and each had a Min of 0, Max of 255, SmallChange of 10, LargeChange of 50 set at DESIGN time. The statement: picRGB.BackColor = RGB( vsbRed, vsbGreen, vsbBlue ) could have been placed inside the Change() event for each of the vertical scroll bars, for example: Private Sub vsbRed_Change() picRGB.BackColor = RGB( vsbRed, vsbGreen, vsbBlue ) End Sub but our better choice was to have a Sub named updateColor, ------ Sub updateColor() picRGB.BackColor = RGB( vsbRed, vsbGreen, vsbBlue ) lblRed = vsbRed ' Using default properties lblGreen = vsbGreen lblBlue.Caption = vsbBlue.Value ' Not using default properties, ' but explicitly typing them ' out for lblBlue Label and End Sub ' for vsbBlue vertical scroll bar Private Sub vsbRed_Change() ' ****** CHANGE() events updateColor End Sub Private Sub vsbGreen_Change() updateColor End Sub Private Sub vsbBlue_Change() updateColor End Sub Private Sub vsbRed_Scroll() ' ****** SCROLL() events vsbRed_Change End Sub Private Sub vsbGreen_Scroll() vsbGreen_Change End Sub Private Sub vsbBlue_Scroll() vsbBlue_Change End Sub See you on Monday. The quiz will take about 15 minutes. It is NOT a full hour long exam or test. Its a short quiz. Watch for UNI VB news on the 10 p.m. news this weekend. That would not be UNI Visual Basic, but UNI VolleyBall news from the West Gym home games. - - Mark