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. Which two controls display graphic images?

  2. Which control is more efficient?

  3. What happens if you load a picture into an Image control and the Image control is too small to hold the entire picture (assume default property values)?

  4. What happens if you load a picture into a Picture Box control and the Picture Box control is too small to hold the entire picture (assume default property values)?

  5. What happens if you load a picture into an Image control and the Image control is larger than the picture (assume default property values)?

  6. What happens if you load a picture into a Picture Box control and the Picture Box control is larger than the picture (assume default property values)?

  7. What is wrong with this assignment (assume that the filename and pathname are correct)?

    imgFace.Picture = "C:\DataPics\Flower.Ico"
    
  8. Which control helps control animation effects?

  9. True or false: A static variable is a global variable because its value doesn't change from a procedure's termination to the same procedure's next execution.

  10. When does a static variable first get initialized?

Exercises

  1. Add a command button to the animation application so that the animation doesn't begin until you click the button. The solution to this exercise might not be obvious at first. (Hint: Consider activating the Timer control in the command button's event procedure.) Put a happy face on the command button and hide the command button so it disappears when the application starts animating the happy face.
  2. Change the animation application so that the happy face bounces off all four sides of the Form window.

Share ThisShare This

Informit Network