Dynamically Added UserControls 
Author Message
 Dynamically Added UserControls

I'm unable to add a usercontrol dynamically to a form. The usercontrol is
named "Testing"

Private Sub Form_Load()

Controls.add "Testing.UserControl",  "Testing1"

I receive the following error; "Invalid class string. Looking for object
with ProgID: Testing.UserControl1.

FYI. "Remove information about unused activeX Controls" is unchecked.

What could be wrong?

JoJo



Wed, 31 Dec 2003 07:11:23 GMT  
 Dynamically Added UserControls
OK, I got it working after I compiled the control and referenced it in the
project. Is this a requirement?

JoJo


Quote:
> I'm unable to add a usercontrol dynamically to a form. The usercontrol is
> named "Testing"

> Private Sub Form_Load()

> Controls.add "Testing.UserControl",  "Testing1"

> I receive the following error; "Invalid class string. Looking for object
> with ProgID: Testing.UserControl1.

> FYI. "Remove information about unused activeX Controls" is unchecked.

> What could be wrong?

> JoJo



Wed, 31 Dec 2003 21:38:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB6 : Adding usercontrols using Controls.Add

2. parameter passing to dynamically inserted usercontrols

3. Serious Memory Leak in Loading/Unloading UserControls dynamically

4. Serious Memory Leak in Loading/Unloading UserControls dynamically

5. Dynamically loading UserControls

6. Crystal Reports: add/delete groups dynamically and starting a new page dynamically

7. Adding Events to Dynamically Added Controls

8. OCX UserControls talking to other OCX UserControls

9. Adding UserControls to a Panel W/Autoscroll

10. Runtime adding/removing UserControls from container e.g PictureBox

11. Runtime adding/removing UserControls from container e.g PictureBox

12. Dynamically adding linefeed (return) to one field in a report

 

 
Powered by phpBB® Forum Software