How to Copy Visual Classes to Other LibrariesID: Q130499 3.00 WINDOWS kbtool The information in this article applies to:
SUMMARYThis article describes three ways to copy a visual class from one class library (.VCX file) to another.
MORE INFORMATIONIt is sometimes necessary to copy a class from one library to another. You can copy a class using one of the following three methods.
Method One: Use the ADD CLASS CommandThe ADD CLASS command adds a class to a class library. The OF clause of the ADD CLASS command allows you to add a class from another class library. For example, if you have a class called Class1 in a library called Mylib and want to copy the class to another library, you can use this command:
Method Two: Use the Project ManagerYou can drag and drop a class from a class library to another one in a project. 1. Open a project, and add two classes to it. 2. Select the Class Library tab, and drill down the class library to see 3. Click a class in the source class library, and drag it to the
The class is copied from one library to the other. You can also open two
different projects and drag a class from one project to the other.
Method Three: Use the Class BrowserYou can drag a class between two instances of the Class Browser. 1. Choose Class Browser from the Tools menu. 2. Open a class library, and select the class you want to copy. 3. Open a second instance of the Class Browser. 4. Drag the class you want to copy from one instance of the Class Browser Copying a class from one class library to another class library adds a
record to the .VCX file. If a class is subclassed, a reference to the
initial location of the parent class exists, and it is not changed when you
copy the class to a different .VCX file. If you want to maintain
inheritance without providing the two .VCX files, you need to edit the
class to modify this reference, and you need to copy the parent class to
the new library. You can use the Class Browser to achieve this.
1. Start an instance of the Class Browser, and select the class you just 2. Select the Redefine button to change the reference to the parent class.
REFERENCESFor more information about copying and redefining classes, search for "Browsing Classes" and then "Managing Classes with the Class Browser" in the Help menu. Additional reference words: 3.00 VFoxWin KBCategory: kbtool KBSubcategory: FxtoolClassdes
|
Last Reviewed: May 1, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |