dusans Posted September 16, 2002 Posted September 16, 2002 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? Quote
Guest InfiniteOutput Posted September 16, 2002 Posted September 16, 2002 How do you insert Controls would be my question! can you help me? Quote
Guest amigo Posted September 16, 2002 Posted September 16, 2002 do you mean insert controls into a form? Quote
Flyguy Posted September 16, 2002 Posted September 16, 2002 Just draw a Coolbar on the Form and draw a Toolbar in the Coolbar Quote
Guest InfiniteOutput Posted September 16, 2002 Posted September 16, 2002 Yes I mean inserting Controls to a form... do you know how? Quote
Guest amigo Posted September 16, 2002 Posted September 16, 2002 ArnoutV just answered your question. If you want to add more controls to your project, from the toolbox, right click mouse select components. Quote
FreakOZ Posted September 16, 2002 Posted September 16, 2002 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.. Quote
Guest InfiniteOutput Posted September 16, 2002 Posted September 16, 2002 I need to insert the controls at runtime and I do not know how many I will need - it depends on the user! Quote
Flyguy Posted September 16, 2002 Posted September 16, 2002 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. Quote
Guest InfiniteOutput Posted September 16, 2002 Posted September 16, 2002 my UserControl is named UC. Load UC or what? Quote
Guest InfiniteOutput Posted September 16, 2002 Posted September 16, 2002 VB is always saying: can´t load or unload objekt. Quote
Flyguy Posted September 16, 2002 Posted September 16, 2002 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 Quote
Guest InfiniteOutput Posted September 16, 2002 Posted September 16, 2002 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? Quote
dusans Posted September 16, 2002 Author Posted September 16, 2002 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. Quote
Leaders Banjo Posted September 16, 2002 Leaders Posted September 16, 2002 So you what to do this in .Net? Quote Those who live by the sword get shot by those who don't!
*Gurus* Thinker Posted September 16, 2002 *Gurus* Posted September 16, 2002 You won't 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. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.