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 minimal argument should you supply when calling MessageBox.Show()?
2:If you don't supply a value for the title parameter of MessageBox.Show(), what gets displayed in the title bar of the message?
3:What type of data is always returned by the MessageBox.Show() method?
4:Which event fires first, the KeyUp or KeyPress event?
5:How do you determine which button is being pressed in a mouse-related event?

Exercises

  1. Modify your custom dialog box project so that the OK button is the Accept button of the form. That way, the user has only to press Enter to dismiss the dialog box. Next, make the Cancel button the Cancel button of the form so that the user can press the Esc key to dismiss the form as well.

  2. Modify your mouse paint project so that the form clears each time the user starts drawing. Hint: Clear the graphics object in the MouseDown event.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.104.153