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. What are three system objects?
  2. What is the difference between a class and an object?
  3. What happens when you use the New keyword inside an object declaration?
  4. True or false: TypeOf is both a statement and a function.
  5. True or false: You can pass objects such as controls and forms as arguments to procedures.
  6. What is the index value for a collection's first item?
  7. How can you insert a new item at the beginning of a collection?
  8. Which OLE automation function should you use to initiate OLE automation when the OLE automation application is already running on the machine?
  9. What is the new term being used more frequently for OLE automation?
  10. True or false: As long as you know the OLE automation language, you don't need the OLE automation application installed on your machine to use OLE automation with that application.

Exercises

  1. Write a procedure that decreases the font size of all controls on all forms by 50%. Use a system object to accomplish the change.
  2. If you use Word, Excel, or any other OLE automation—compatible application (as all the Office 97 products are), start that application and search the online help for information on that application's properties, events, and methods used in OLE automation. The more you know about that application's internals, the more easily you can integrate that application and borrow its power for your own applications. If the application is an Office 97 application, search the online help for the Visual Basic help to see how to start Visual Basic. (Visual Basic is often called Visual Basic for Applications in application help files. Visual Basic for Applications [or VBA] is the same language as Visual Basic.) Start the application's Visual Basic editor to see a development environment that looks like Visual Basic's own development environment. Open the application's Object Browser to receive an Explorer-like view of that application's properties, events, and methods. Search the Object Browser's online help for extensive OLE automation help.

Share ThisShare This

Informit Network