Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Re-using a form saved as class.
Message
 
To
09/12/1999 16:57:14
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00301336
Message ID:
00301357
Views:
24
>Hi Paul,
>
>>I created a form with controls and saved it as a class. (VFP5)
>>How do I (visually) create a new form inheriting those properties/methods?
>
>CREATE FORM MyNewForm AS MyClass FROM MyClassLib or set the default form class to this class in Tools>Options, then just create a new class normally.

Thanks for your quick reply. I just tried

CREATE FORM test AS ctgrybaseform FROM p320classes

and got an "unrecognized phrase/keyword" error

The VFP5 help file gives the following syntax for CREATE FORM:

CREATE FORM [FormName | ?]
[NOWAIT] [SAVE] [DEFAULT]
[[WINDOW WindowName1]
[IN [WINDOW] WindowName2 | IN SCREEN]]

Mentions nothing about classes.

I don't want to use it as default form /template.

>One thing you may or may not know about the class (hard to tell from your post): your form will only inherit the behavior of your class, not the code (Are you awake Jim? <g>). This means you can't see or edit the existing method codes, but it will run when the form is run.

Thats OK.
-----------------------------------------------------------------
Paul Lee ........... Abri Technologies ......... http://abri.com/
'Recover' - top rated FoxPro/dBase file repair utility.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform