
ATTN: Java/C++ users - What is the equivalent if this in VB?
Quote:
>>Ok,
>>To programatically add a control to a form in
>>Java or C++ basically you do this:
>>Textbox theControl; // create a pointer variable
>>theControl = new Textbox("blah, blah, blah"); // allocate memory
>>form1.add(theControl); // add control to the form
>>Now the control (a textbox) is on the form, so
>>how do I programatically add controls to a VB form?
>>Is it something similar to this?
>No can do, I'm sorry to say. You need to have a text box on the form
>before you can create other instances of it.
Ted,
You can put a textbox control array on the form in design
mode and set the visible property to false. During runtime
that gives you the ability to set the visible property to true
and to add elements to the array. A clumsy work around,
but the only one VB allows.
Peter Mikalajunas
http://www.xnet.com/~kd9fb