ATTN: Java/C++ users - What is the equivalent if this in VB? 
Author Message
 ATTN: Java/C++ users - What is the equivalent if this in VB?

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?

Help

Ted,



Mon, 22 Mar 1999 03:00:00 GMT  
 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.

Rick Clark



Tue, 23 Mar 1999 03:00:00 GMT  
 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



Thu, 25 Mar 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB equivalent of Java Vector?

2. VB.net equivalent to C++ macros __FILE__ and ___LINE__

3. IL-CHI//OBJECT ORIENTED DEVELOPERS...SMALLTALK,C++,VB,JAVA

4. IL-CHI//OBJECT ORIENTED DEVELOPERS...SMALLTALK,C++,VB,JAVA

5. IN NEED OF VB,C++, OR JAVA PROGRAMMERS

6. In need of VB, C++, or Java programmers

7. Power of VB over Java, C++

8. Medical Speech Recognition (VB/C++/Java)

9. VB equivalent of C++ pointers??

10. Level 2 Quotes, Execution, Charts in Java, VB or C++

11. *** O-O, C++, JAVA, VB Programmer**** Houston, TX

12. "java, c++, and vb"

 

 
Powered by phpBB® Forum Software