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. Why does Visual Basic printer output not go immediately to a printer?

  2. What happens if the printer isn't online when the user prints something?

  3. What is the difference between the Printer object and the Print method?

  4. How can you specify the number of output copies to print?

  5. True or false: You can add the Printer object to the toolbox.

  6. How many spaces does a print zone contain?

  7. Why do you sometimes need to use the ASCII-based Chr() function when printing?

  8. What's the output from the following code?

    Printer.Print "1";
    Printer.Print "2"
    
  9. True or false: Using Tab(14) after each variable does the same thing as putting a comma after each variable printed.

  10. True or false: You can apply the Print method to a form.

Exercises

  1. Write the Print method that prints a Spanish Ñ (with a tilde) on the printer.
  2. Write a program that prints ASCII values 32 through 255 on paper when the user clicks a command button.
  3. Modify the book publisher application from Hour 15, "Visual Basic Database Basics," to print on paper the current book's title and year when the user clicks a Print command button.

Share ThisShare This

Informit Network