-
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
[email protected]
ICQ# 47799046
-
It can be done, but not easily. The easier way to do this is have an create an array of an object and make its index 0. The other way involves much more code. I'd go with option 1 if you can.
Phil
-
What do you mean when you say "create an array"? I am interested in your idea, because I like the idea of little code. But could you please explain it better, I don't understand what you mean.
------------------
Thanks,
Ryan
[email protected]
ICQ# 47799046
-
What Philip is saying is not actually creating the form from scratch, but rather create another instance of the existing form.
Code:
Dim frm As New Form1
frm.Show
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
-
So what you mean is to create all the different possible forms at design time and then just show the form that fits what the user inputs as the criteria? Did I understand you correctly? Is that what you were saying?
------------------
Thanks,
Ryan
[email protected]
ICQ# 47799046
-
Well, I think you want something like this:
1. Create a form. 2. Create textbox
3. Insert data into the textbox and save them
if that is the point use this, after create the form as you know
DIM ctlWname as object
set ctlWname=frmForm.Controls.Add("VB.Textbox")
with ctlWname
. visible=true
.top= x 'Your top Position
.Left=x 'idem
.width=x 'idem
.height=x 'idem
.font.size= fx 'your font size
end with
Anyway this solution in on MICROPress Distributed Applications For Microsoft Visual Basic 6.0 MCSD Training Kit. ISBN 0-7356-0833-4
-
Take a look at the Code snippet I posted for the similar question.
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]