Problem with ActiveX container controls

dusans

Member
Joined
Sep 16, 2002
Messages
20
I have a problem using ActiveX controls on form. Some controls should act as container (TabControl, CoolBar), but in designer I cant insert any controls in them. Same controls work well with Delphi or VB6. Is this a bug or there is some special action to perform to insert control into non-standard container?
 
ArnoutV just answered your question.

If you want to add more controls to your project, from the toolbox, right click mouse select components.
 
If you want to insert controls that are not listed in the left hand toolbar then select the project menu, then components and select the component to add to the tool bar.. then just click on the icon and drag on the form..
 
I need to insert the controls at runtime and I do not know how many I will need - it depends on the user!
 
Put one instance of all needed controls on the form.
Set their index to 0.
Now in code you can use the Load statement to add instances of the desired controls.
 
Just an example.
Make sure you have a Text1 control on your form and have set its index to 0. I also used 2 command buttons (cmdAdd + cmdDelete)
Code:
Private Sub cmdAdd_Click()
  Load Text1(1)
  Text1(1).Move 0, 0
  Text1(1).Visible = True
End Sub

Private Sub cmdDelete_Click()
  Unload Text1(1)
End Sub
 
Active X

The way of inserting controls into ActiveX containers works in VB6 but not in VB.Net. Im interested in inserting control in container as child control of that container.
 
You wont be inserting any .Net controls inside of ActiveX
container controls. There *might* be a way to get other ActiveX
controls inside the container, but there could be some licensing
problems.
 
Back
Top