Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Form from class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00271236
Message ID:
00271469
Views:
23
>>What I want is to be able to take a form that is a class, do a search and replace, and create a new form with the new values. So, I created a form visually and saved it as a class. Then I created the code from the class which I figured I use to do the search and replace and then generate a form from the code. Is there a better way?
>
>So you want to create a subclass of the form class on the fly? That is unusual, usually one will create the form class they want in the class designer and then instantiate that class. Or create a from class and use that class to create a form with the form designer and run the new form in the runtime system.
>
>Your idea of doing a search and replace on a class is actually frustrating the value of subclassing. Instead of using the class as the basis for a subclass you are editing the actual class code itself.
>
>In VFP6 SP3 with the new compiler available at runtime you could cereate a prg that defines a subclass of the fomr class, compile it and then SET PROCEDURE TO that prg and CreateObject("TheFormClassInThePrg").

I understand about the subclassing but I want to change the ControlSource and Names of the fields. I will give your suggestion a try. Thanks.

BTW, are you going to be in the Wash. DC area the first Thursday in December?
DLC
"Use the Right Tool for the Job!"
davidandcynthia@email.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform