04.08.2013 Views

Chapter 10 Using VFP's Object- Oriented Tools - dFPUG-Portal

Chapter 10 Using VFP's Object- Oriented Tools - dFPUG-Portal

Chapter 10 Using VFP's Object- Oriented Tools - dFPUG-Portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

272 The Fundamentals of Visual FoxPro 6.0<br />

2. Issue the CREATE CLASS command (or select the File, New, Class menu option).<br />

The New Class dialog appears, as shown in the background in Figure <strong>10</strong>.5.<br />

3. Enter the name of the new class, such as hwFrmDialog, as shown in the New Class<br />

dialog in Figure <strong>10</strong>.5.<br />

4. Click the ellipsis button next to the Based On combo box.<br />

5. The Open dialog will appear, as shown in Figure <strong>10</strong>.5.<br />

Figure <strong>10</strong>.5. Selecting a class upon which to base another class.<br />

6. Select the class upon which you want to base your new class. In Figure <strong>10</strong>.5,<br />

hwFrmDialog will be based on the hwFrm class in the HWCTRL61.VCX class<br />

library.<br />

7. Click Open.<br />

8. Choose (or create) the class library in which the new class will be stored. I suggest that<br />

you store your new class in the same class library that holds the parent class.<br />

Note that you could choose a different class library to store hwFrmDialog. You would<br />

want to have a specific reason to do so. The downside of using a second class library<br />

to store hwFrmDialog is that you’d then have to open two class libraries in order to<br />

use a single class—why make it that hard on yourself? On the other hand, what if you<br />

wanted to distribute hwFrmDialog to someone else, without sending them every class

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!