Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I have a problem using ActiveX controls on form. Some controls should act as container (TabControl, CoolBar), but in designer I can't 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?
Guest InfiniteOutput
Posted
How do you insert Controls would be my question! can you help me?
Guest InfiniteOutput
Posted

Yes I mean inserting Controls to a form...

do you know how?

Posted

ArnoutV just answered your question.

 

If you want to add more controls to your project, from the toolbox, right click mouse select components.

Posted
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..
Guest InfiniteOutput
Posted
I need to insert the controls at runtime and I do not know how many I will need - it depends on the user!
Posted

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.

Guest InfiniteOutput
Posted

my UserControl is named UC.

 

Load UC or what?

Guest InfiniteOutput
Posted
VB is always saying: can´t load or unload objekt.
Posted

Just an example.

Make sure you have a Text1 control on your form and have set it's index to 0. I also used 2 command buttons (cmdAdd + cmdDelete)

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

Guest InfiniteOutput
Posted

I think that´s the right code, but VB is wanting some kind of Objektvariable. What does this mean?

My UserControl is called UC...

Are you sure you can insert a user control as easy as a normal objekt?

Posted

Active X

 

The way of inserting controls into ActiveX containers works in VB6 but not in VB.Net. I'm interested in inserting control in container as child control of that container.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...