
Dynamically Creating Controls and Forms at runtime - HELP!!!!
Quote:
> I am currently looking for information on how to create both forms and
controls dynamically at runtime.
don't know about the C++ bits, but attached are a form and a proc file from
one of my little apps, it's not commented and please don't berate me for
any bad coding or whatever - the thing is still in a state of development.
I haven't included all the code, nor the rest of the files but you should
be able to get an idea of what's going on.
Basically the calling form runs GenForm which in turn creates a new
instance of the Generic form which in turn goes and gets the info it needs
to build the relevant controls by looking at the layout of the given
database table. Each of the source controls is the first of a control array
- this is the important bit. By LOADing each control as a template VB can
then create a new instance with the properties specified.
I got the info I needed to do this from Visual Basic Magazine (April 96) -
can't remember the author.
Hope this helps you as much as it did me..........
--
Chris Ashton
Applications Design Analyst
iQ Computing Limited, Uk
begin 600 frmGeneric.frm
<uuencoded_portion_removed>
`
end
begin 600 frmGeneric.frx
<uuencoded_portion_removed>
$97AT`&5S
`
end
begin 600 GenMod.bas
<uuencoded_portion_removed>
`
end