Re: Forms and UserControls, New to C#
From: Tom Dacon (tdacon_at_community.nospam)
Date: 07/30/04
- Next message: news microsoft: "Re.Crystal Report"
- Previous message: Austin Ehlers: "Re: String conversion"
- In reply to: Johnny Fugazzi: "Re: Forms and UserControls, New to C#"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Jul 2004 21:21:59 -0700
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" <abillmeier@ldmkusa.com> wrote in message
news:OQCuC9adEHA.720@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" <tdacon@community.nospam> wrote in message
> news:%230JhZ4adEHA.3616@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" <abillmeier@ldmkusa.com> wrote in message
> > news:uanKZsadEHA.3632@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?
> > >
> > >
> > >
> >
> >
>
>
- Next message: news microsoft: "Re.Crystal Report"
- Previous message: Austin Ehlers: "Re: String conversion"
- In reply to: Johnny Fugazzi: "Re: Forms and UserControls, New to C#"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|