Workshop

   

The Workshop is designed to help you anticipate possible questions, review what you've learned, and get you thinking about how to put your knowledge into practice. The answers to the quiz are in Appendix A,"Answers to Quizzes/Exercises."

Quiz

1:

What object is used to draw to a surface?

2:

To set a Graphics object to draw to a form directly, you call what method of the form?

3:

What object defines the characteristics of a line? A fill pattern?

4:

How do you make a color property adjust with the user 's Windows settings?

5:

What object is used to define the bounds of a shape to be drawn?

6:

What method do you call to draw an irregular ellipse? A circle?

7:

What method do you call to print text on a Graphics surface?

8:

To ensure that graphics persist on a form, the graphics must be drawn on the form in what event?

Exercises

  1. Modify the example in this hour to use a font other than Arial. If you're not sure what fonts are installed on your computer, open the Start menu and choose Settings and then Control Panel. You'll have an option on the Control Panel for viewing your system fonts.

  2. Create a project that draws an ellipse that fills the form, much like the one you created in this hour. However, draw the ellipse directly to the form in the Paint event. Make sure that the ellipse is redrawn when the form is sized . (Hint: Invalidate the form in the form's Resize event.)


   
Top


Sams Teach Yourself C# in 24 Hours
Sams Teach Yourself Visual Basic 2010 in 24 Hours Complete Starter Kit (Sams Teach Yourself -- Hours)
ISBN: 0672331136
EAN: 2147483647
Year: 2002
Pages: 253
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net