Dynamically adding controls to a form at runtime 
Author Message
 Dynamically adding controls to a form at runtime

Hi!

Can anyone help me with the following:

I would like to know how to add a control (let's say a text box) to a form
at runtime.  The text box will be part of a control array.

Thanks in advance!

Kent.



Wed, 04 Oct 2000 03:00:00 GMT  
 Dynamically adding controls to a form at runtime

Redim the Control Array to one greater than current size then:
"Set MyControl(7) = New Textbox
Mycontrol(7).left = etc etc etc
Hope this helps

--
Kind Regards Mike Davies

Quote:

>Hi!

>Can anyone help me with the following:

>I would like to know how to add a control (let's say a text box) to a form
>at runtime.  The text box will be part of a control array.

>Thanks in advance!

>Kent.



Thu, 05 Oct 2000 03:00:00 GMT  
 Dynamically adding controls to a form at runtime

Hi Kent:

Quote:
>I would like to know how to add a control (let's say a text box) to a form
>at runtime.  The text box will be part of a control array.

Have a look in the VB help file under "Load", "Control Arrays" and "Index",
i.e.

  Load Text1(NewIndex)

Doug.



Thu, 05 Oct 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dynamically adding a custom control to a form during runtime

2. How Do I Dynamically Add Controls To A Form At Runtime?

3. How Do I Dynamically Add Controls To A Form At Runtime?

4. Dynamically adding controls at runtime.

5. Dynamically adding controls at runtime...

6. Dynamically adding controls at runtime

7. Changing Index of Dynamically Added Control at Runtime

8. Dynamically adding controls at runtime...

9. Can I dynamically(runtime) create a form/control?

10. Dynamically Creating Controls and Forms at runtime - HELP!!!!

11. Dynamically add ActiveX control to VB.NET Form

12. Add user control to Web Form dynamically

 

 
Powered by phpBB® Forum Software