Microsoft KB Archive/130325

= PRB: Cannot Add Methods to Objects at Design Time =

Article ID: 130325

Article Last Modified on 2/10/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q130325



SYMPTOMS
Selecting the Form, New Property option while a control is highlighted does not add a property to a control. The new property is added to a form.



CAUSE
This is by design. When a form is created with the CREATE FORM or MODIFY FORM commands, a form object is instantiated, and instances of objects are manipulated in design mode. Generally, a property cannot be added to an object once it is instantiated, and to modify a visual class, it is necessary to use the Class Designer. However, a special case has been made to the Form designer, where the form is subclassed to allow the creation of form properties and methods at form design time. This feature is not available for controls.



WORKAROUND
Use the Class Designer to modify the class definition of a control. For more information about using custom objects in a Form, refer to the 'Adding User Defined Objects' paragraph in the Visual FoxPro "Developer's Guide," Chapter 9, "Creating Forms."



STATUS
This behavior is by design.

Additional query words: vFoxwin

Keywords: KB130325

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.