|
-
Oct 4th, 2000, 02:30 PM
#1
Thread Starter
New Member
Can you create VB forms that can be customized at runtime? If so, how? Is there a third-party control that will allow you to do this?
Thanks.
Lisa
-
Oct 4th, 2000, 05:12 PM
#2
Fanatic Member
In which way do ya wanna customize them? Shape, size, color, behavior?
What exactly do you have in mind?
-
Oct 5th, 2000, 07:59 AM
#3
Frenzied Member
you can change the controls around by using the Form1.Controls collection's add and remove methods.
-
Oct 6th, 2000, 09:08 AM
#4
Thread Starter
New Member
Customizing VB Forms at Runtime
I need a form that will allow users to select from available fields in a database and drop them onto a form and move the controls around to create their desired look. When a database field is selected a text box and label should be created on the form for that field. They should be able to have the ability to remove fields/controls as well.
I'm interested in a third-party tool to accomplish this. I know it can be done because I'm able to customize forms in a program called Summation. I can't determine which language the program is written in.
Thanks for any help.
Lisa W.
-
Oct 6th, 2000, 09:19 PM
#5
It can be done in VB entirely in code, although it is a difficult task.
Adding, removing and moving the controls is relatively easy, using the Controls.Add function, and setting the controls DragMode to automatic (although you will have to translate the mouse positions correctly).
The major thing you need to think about is the way you handle your data entry. Will the app require certain bits of information to save correctly, and what happens if the user removes those text boxes that hold that data? How are you going to handle tab orders? How are you going to re-assign the parent HWnd for controls you want to put on tabstrips or in frames? How will you data validation routines work with unknown data?
Conceptually, using a simple database, it's not too difficult, especially if there is no data validation of required fields, but to do this for complex data entry forms requires far more coding than perhaps is practical. If you're developing for a corporation, then you stand a good chance of blowing your budget solely on the customisation functionality. If you're doing it as a personal project, then you run the risk of spending all your time providing the customisation stuff at the detriment of the actual software operation and purpose.
This is not to say that it can't be done, but you probably need to way up the "Ooohhh" factor in comparison to the time required to implement it.
The other consideration is that does the program actually require such functionality? Basically, you need to answer these questions practically, with consideration to all the factors pertaining to the project
- gaffa
(editied for typos)
[Edited by gaffa on 10-06-2000 at 10:27 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|