You might look around for a good text on the principles of object-oriented
design. This isn't really a language issue - the principles apply to VB just
as firmly as they apply to C# or C++ or SmallTalk or any other
object-oriented language. In fact, if you were to do a search for such a
book, I'd look for something that didn't concentrate on a single language so
much as it emphasized the language-independent principles.
Sorry I don't have a specific recommendation. I've been doing this for so
long that the primary references I used when I was integrating these
principles are kind of dated now.
I will say, however, that Microsoft's MSDN library and the sample code that
you find there are not necessarily the best examples of good object-oriented
design that you'll come across. So don't take what you find there as gospel.
Best of luck,
Tom Dacon
Dacon Software Consulting
"Johnny Fugazzi" <ab********@ldmkusa.com> wrote in message
news:OQ*************@TK2MSFTNGP11.phx.gbl...
Sounds like it makes sense.
Do you have a good reference or place for information to look into this?
Like I mentioned, I am new to using C# in a windowsForms environment. I
have mostly worked with vb.net in asp.net environments in the past.
"Tom Dacon" <td****@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... A good principle for questions like this is that of loose-coupling. It's
generally a good idea for a user control to know little or nothing about
where it's sited. Better, I think, to raise custom events to the owner
when something interesting happens, and let the owner take whatever action is
appropriate, such as updating the contents of other controls on the
form. This gives you the freedom of making changes to the form without having
to modify the user control's code, and lets the parent form encapsulate all
information about its logic and behavior.
HTH,
Tom Dacon
Dacon Software Consulting
"Johnny Fugazzi" <ab********@ldmkusa.com> wrote in message
news:ua**************@TK2MSFTNGP11.phx.gbl... I am working on a basic windows for App using c# and vs.net2003.
I have a usercontrol containing a treeview, and I need to display
things on he main form based on the item selected in the treeview. What is the
bestway to reference the panel (or other controls) on the main form
from the UserControl?