I don't have a book to recommend, but I can give you my general rules.
1) A form has a limited number of controls that can actually be on it. (I
don't know the limit off hand). Use a control to wrap controls when you
have too many for the form. This way it sees your wrapper as one control
rather than 30.
2) When you want to re-use functionality. E.g. I have many text boxes
that I want to all perform the same way. (I want them to handle Nulls this
way, etc.)
3) The best reason to use controls. I am abstracting viewing of data in
my application. I can then have the controls implement one set of calls
that will be generic for the displaying, saving, refreshing, of data. This
way the shell app only has to know what control to dynamically create for
the data that is desired. Then the control can deal with displaying it.
4) I want to re-use the display of data. I want this type of data to be
viewable/editable in many different places in my application. By have a
control that does this, you only have to write the handling of the data
once.
5) ActiveX controls can be part of a web page. (I never do this
personally, but it is a reason to use controls.) If you use controls for
your exe, then you could mount the control in a web page.
> Hi List
Will someone please recommend a book that outlines the best practices with
regards to creating user controls, when to use, when not to use, user
controls vs forms etc
Thanks in advance
Mark Warner
______________________________________________
"The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking action
in reliance of the contents of this information is strictly prohibited
and may be unlawful. Absa is liable neither for the proper, complete
transmission of the information contained in this communication, nor
for any delay in its receipt, nor for the assurance that it is
virus-free."