Sams Teach Yourself Visual Basic 6 in 24 Hours

Sams Teach Yourself Visual Basic 6 in 24 Hours

By Greg Perry

Workshop

The quiz questions and exercises are provided for your further understanding. See Appendix B for the answers.

Quiz

  1. True or false: Option button captions always appear to the right of the buttons.
  2. What happens if the user clicks an option button that isn't currently selected?
  3. Why would you gray out a Check Box control?
  4. What happens if the user clicks a check box that isn't currently selected?
  5. True or false: An application can begin with none of its option buttons or check boxes selected.
  6. What kind of control can you place on a frame?
  7. What is the difference between a scrollbar's SmallChange and LargeChange properties?
  8. Which property changes when the user clicks one of the scrollbar's arrows?
  9. True or false: The Timer control works like an alarm clock ready to go off at a preset time of day.
  10. True or false: If you need a timer interval greater than approximately 10 seconds, you must use multiple Timer controls.

Exercises

  1. Create an application that mimics the frame application used with Listing 11.1. Instead of using separate option buttons, use an option button array for each frame's option button, making a total of three option button arrays. Change Listing 11.1 to reduce the number of event procedures in the application. Use a Select Case statement based on the event procedure Index argument to set the appropriate label property.
  2. Change the application you wrote in exercise 1 so that no frames appear on the form. Remove the Underline and Italic option buttons (keep the Framed Color option buttons) and add these check box controls in their place: Underline and Italic. Change the code so that the text will appear underlined if the user clicks the Underline check box, and the text will be italicized if the user clicks the Italic check box. Both or only one might be checked at any one time.
  3. Duplicate this lesson's scrollbar application that lets the user set the label's text size with the scrollbar. Completely remove the scrollbar, however, and add a Timer property. Every second, add 5 to the label's font size. When the font size grows to 70 or more points, send the size back down to 8 and start increasing the size once again.

Share ThisShare This

Informit Network