PDA

Click to See Complete Forum and Search --> : Creating forms at runtime


Gimpster
Nov 1st, 1999, 06:19 AM
Simply put, what I want to have is something that will work the same as the Data Form Designer in VB. I want to be able to create the form, create the text boxes and labels, and set all the properties. And it must all be based on user defined variables (such as: the fields they want displayed, what table to use, etc.) Please help, I know this is a huge task, but that's what I need.

------------------
Thanks,
Ryan
corneslen@hotmail.com
ICQ# 47799046

Clunietp
Nov 1st, 1999, 10:33 AM
You're a funny guy, gimpster! :)

Gimpster
Nov 3rd, 1999, 02:35 AM
Ok, and what's that supposed to mean? Look, I just need help with my programming.

------------------
Thanks,
Ryan
corneslen@hotmail.com
ICQ# 47799046

Clunietp
Nov 3rd, 1999, 10:25 AM
just kidding ryan

you could use dynamically generated controls (with control arrays), but if you needed any code on that form it could become very difficult....

Serge
Nov 3rd, 1999, 08:43 PM
Check out the Code (http://www.vb-world.net/ubb/Forum1/HTML/009905.html) I posted to create a form with controls in runtime.

Regards,

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com

Gimpster
Nov 4th, 1999, 05:38 AM
Ok, here's what I'm going to need on those forms.

1. Text boxes to display the information contained in the database (this is where the user input comes in)

2. A way to maneuver around in the database (again, preferably something more aesthetically pleasing than the drab data control)

That's what I'm going to need to have in the forms that I want to generate. But I need to get headed on the right track to being able to set up a form in which you select the table you want to access, and then which columns you want to see, and also different select statements (to search the table with), and then finally bring up the form. Please say you can help me.

------------------
Ryan
corneslen@hotmail.com
ICQ# 47799046

Pratyush
Nov 4th, 1999, 12:23 PM
Its a huge task altogether but it is not impossible. Can be done effecienlty but will take some time.
Basically you have to develop your own ActiveX control as substitue of Form.

Provide these properties with your form.

1)Connection Name ---
2)Record Source ---
3)No of Controls to get Displayed---

Instead of TextBox you have to use your own ActiveX control that will provide a property like this.
1) Field To bound

Steps :
1. Initialize the Connection,Recordsource,No of Controls property in the ActiveX form.
2. Load TextBoxes on the form = No of
Controls to get Displayed
3. Bind the text boxes with the fields which are the result of Record Source property of the form.

I know, this is not enough but I have seen such controls developed by my colleagues and they are working fine.
Bind the

Gimpster
Nov 4th, 1999, 10:02 PM
Do you know of any good book, or of any good site where I can learn how to use AciveX controls? Because I have not had any experience with them yet, and so I don't really know how to do what you're saying. I would like to learn ActiveX but could you recommend somewhere to go? Thanks

------------------
Ryan
corneslen@hotmail.com
ICQ# 47799046