How to: Add Code to Methods and Events
You can add code for methods that you add to classes or class events using the Class Designer or programmatically.
To add code for a method or event
Open the class in the Class Designer.
For more information about opening classes, see How to: Modify Classes.
On the Visual FoxPro toolbar, click Properties Window.
In the properties list of the Properties window, double-click the method or event you want to add code for to open a code window.
Note
Custom methods appear at the end of the properties list.
In the code window, add code for the method or event.
When you are finished adding code, close the code window.
For more information, see Properties Window (Visual FoxPro) and Code Window.
To add code to methods and events programmatically
- Use the DEFINE CLASS command and include the FUNCTION or PROCEDURE clause.
For more information, see DEFINE CLASS Command.
See Also
Concepts
Working with Classes in Visual FoxPro