Brief Word on Naming the Class

All things have names, and class modules are no different. The name you give a class module, however, is the name that is shown in both the Project Explorer and the Object Browser, so it should be something relevant and meaningful. For a more in-depth discussion on naming objects, refer to section on Naming Objects, later in this chapter.

To name your class, display the Properties window by selecting it from the View menu, or by pressing F4. Then enter a name in the (Name) property. You might like to review Appendix G for object-naming conventions and prefixes.

You will have undoubtedly noticed that there is another property in the Properties dialog box that we have not mentioned—Instancing. Since you need to understand several other concepts before we explain this one, and it would be inappropriate to do so now, we have left this topic until the very end of the chapter.

Figure 12-4 shows our clsKennel class in the Object Browser, which you can display by selecting Object Browser from the View menu, or by pressing F2.

Figure 12-4

Notice that details of the selected property or method are displayed under the Classes pane. You can filter the Classes pane by selecting a project or library from the Project/Library combo box, as shown in Figure 12-5.

A more detailed explanation of the Object Browser is given in Chapter 5, but since you can't do any damage by experimenting in the Object Browser, feel free to look around and click all the buttons.

0 0

Post a comment