473,387 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Controlcontainer is .Net

I’m currently familiarizing myself with VB.net and right now I’m looking at
the usercontrol. In VB6 it was possible for a usercontrol to act as a control
container. However, I can’t find a property in .Net that would make it work
similarly. When I look in the MSDN database, all I can find are documents
relating to VB6.
Please tell me a control container is still possible in .Net

Nov 21 '05 #1
3 1009
"Jerry" <Je***@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
In VB6 it was possible for a usercontrol to act as a control container.
However, I can't find a property in .Net that would make it work
similarly. When I look in the MSDN database, all I can find are documents
relating to VB6.
Please tell me a control container is still possible in .Net


So you want to write a UserControl and then have other Controls
placed "onto" or "into" the finished article?

Look at the Modifiers on the UserControl and the other Controls
within it. By default, these are Friend, so you can only change them
within your UserControl's assembly. Change them to something more
useful, like Protected (for Developers to use) or Public (for end users).

HTH,
Phill W.
Nov 21 '05 #2
Hi Phil,

What I was looking for is basically a combination of a .Net usercontrol and
a .Net panel control. Using the modifiers would give you access to controls
that are placed on the usercontrol itself and not enable you to add controls
to the usercontrol after the usercontrol has been placed on a form, right?

My question has become a bit irrelevant, though. I was a bit stuck in VB6
thinking and forgot about a bonus that .Net has. With inheritance I can
basically do that what I wanted to use the contained controls for. It will
mean more usercontrols in my project, but the forms will be cleaner.

Thanks,

Jerry
Nov 21 '05 #3
"Jerry" <Je***@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
What I was looking for is basically a combination of a .Net
usercontrol and a .Net panel control.
You could just create your own Control /directly/ derived from Panel,
if you wanted to.
Using the modifiers would give you access to controls that are placed
on the usercontrol itself and not enable you to add controls to the
usercontrol after the usercontrol has been placed on a form, right?


Depends how you set them. IIRC, you can create a UserControl with
a Panel on it (that fills all of the available area), set all the modifies
to
Public and you should be able to drop new Controls onto it, even at
RunTime. I think.
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: juli jul | last post by:
Hello, I would like to know if there is a function which is running during the runtime of my program all the time and where I could place events overloading and things I need to check during the...
0
by: Jeremy Howard | last post by:
Hello everyone, Does anyone know if it is possible to raise an event from a user control contained within an IFRAME and then recieve that event back on the page that contains the IFRAME? Below...
2
by: Phil | last post by:
Hi all, If I remember correctly, in VB you can refer to your controls from a module simply by referring to ControlContainer, ie. Form1.Textbox1.Text = "something". I have added a module to my...
7
by: mef526 | last post by:
I would like to reference a dynamically created control and I know the name. I would like to use the following: Dim strName as String = "txtControl1" ' This is the ".Name" used when textbox was...
2
by: Meelis | last post by:
Hi When i create UserControl in VB.NET 2005, how i can enable ControlContainer? In vb6 was a property named ControContainer, how can i enable it in VB.NET? Best regards; Meelis
6
by: Ronald S. Cook | last post by:
We have a Windows app that has one main form (a shell, sort of). We then load user controls into a panel on the form depending on what the user has selected. Our current code to unload the...
4
by: Joseph Geretz | last post by:
Don't get me wrong - I'm a fan of .NET; I am enthusiastic about the richness and elegance of the environment. However, richness and elegance should be dedicated toward making development easier for...
3
by: Goodbyemoff | last post by:
Hello.... How would i turn a custom control into a container, either the whole thing or just an object in it such as a panel. Any Ideas? Code or Links would be just great. Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.