Date: Wed, 26 Jul 2006 17:43:09 -0500 (CDT) From: Mark Jacobson To: 810-030-01@uni.edu Subject: Making a target and coloring the stairstep rectangles... Hello Visual Basic students, http://www.cns.uni.edu/~jacobson/030VB.NET/BullsEyeSteps.gif Try to create the bull's eye target, if you can. Dim brush As SolidBrush draw = Me.CreateGraphics brush = New SolidBrush(Color.Purple) Notice I changed to SolidBrush for the variable brush... ---------- That allowed me to do this: brush.Color = Color.FromArgb(Rnd() * 255, Rnd() * 255, Rnd() * 255) and get RANDOM colors using the Color.FromArgb() method from the Color class. For i As Integer = 300 To 50 Step -50 rect.Width = i rect.Height = i YOU TRY TO FIGURE OUT THE REST of the For Next loop body set of actions that goes here.... Next i http://www.cns.uni.edu/~jacobson/030VB.NET/BullsEyeSteps.gif http://www.cns.uni.edu/~jacobson/c030NET.html I will add to the following midterm study guide some additional topics that we have covered since then. However, this study guide is a good place to begin reviewing for the final exam. http://www.cns.uni.edu/~jacobson/email030NETmidterm.txt 17. Know how to read a file that contains numbers separated by spaces or semicolons on each line. Display the name of each student followed by the sum of the 3 scores, i.e. their total points: (Display the name and total points in a Label named lblScores) Example data file (named scores.txt): Frodo Baggins;95;83;71 <--------- What is GIVEN? Cinderella;100;88;96 Bilbo Baggins;59;72;81 The INPUT or data Jimi Hendrix;75;77;68 is a file named: Joan Osbourne;91;81;71 Wes Montgomery;100;97;98 scores.txt on Carlos Santana;94;81;99 C:\VB\scores.txt path. ---------------- Here is what the output shown in lblResults would look like for the above data: ---------- Frodo Baggins 249 Cinderella 284 Bilbo Baggins 212 Jimi Hendrix 220 Joan Osbourne 243 Wes Montgomery 295 Carlos Santana 284 Mark