You can view the code for class definitions, specific parameters, or parent class code for user-defined methods using the Class Browser. You can also save class definition code to another class library.
To view class definition code
In the Class Browser, open the class library you want.
For information about opening the Class Browser, see How to: Run the Class Browser.
In the class list, select the class you want.
In the Class Browser, click the View Class Code button.
Visual FoxPro displays definition code for the class in a read-only program (.prg) file. The class definition displayed includes all property settings and method and event code.
|The code is displayed for viewing purposes only. In many cases, you can save it to a program and run it directly; however, code with nested containers generate errors. To view type library information, use the Object Browser Window.|
You can use a limited selection of editing commands, such as Find, Copy, and Select All, on the Edit menu.
If parent class code is available for a user-defined method, you can view the parent class code.
To view parent class code for a user-defined method
In the Class Browser, double-click a class or class member.
The class or class member opens in the Class Designer or Form Designer. If no code window is open, on the View menu, choose Code.
On the Visual FoxPro toolbar, click the Edit ParentClassВ Method button.