>Has anyone done this?
>
>I am wanting to build forms on the fly based on information in tables. There would also be a form manager that would be used to maintain the form data, such as label name, control type, validation, location, etc.
>
>Any ideas on this? Is there a third party product that does this.
>
>Anthony Virgil
I've done this two ways recently:-
1) The form definitions can change at run-time, so the form must be generated each time it is used. You can write some code that build the form dymanically. Start wit a CREATEOBJECT() to create the form, then use the AddObject method to add the textBoxes, labels etc. The only drawback here can be that the process can take some time, giving a delay before the user sees the form.
2) The form definitions are set before the application is distributed, but do not change at run-time. It can be useful to auto-generate your forms where you will have many complex screens that would just take too long to hand build. For this situation use a program that will write another .PRG containing the class definitions for all the forms (DEFINE CLASS... ENDDEFINE).