component/control design differences

F

forest demon

i'm needing to create a custom entry form that needs to be reusable
throughout an application framework.

my first thought is to create a custom control to accomplish this.

am i correct in saying that if you need a visual aspect to a reusable
component, you should use a custom control class. or if you need a
non-visual component, you should use a component class. could you
also use a component class and build the interface through code (why
you would want to do this, i don't know)?

can someone explain the differences (that are not obvious) between the
custom control class and the component class.

thanks all....i appreciate your time.

-
forest dAemon
 
A

Arthur Vanderbilt

A custom form control is the best option for reusability &
maintainability. You can write a controller class of some sort that
manipulates your form and its data or even builds visual elements of the
form, but it is best to inherit Form or one of its derivatives and
create a custom control for the user interface portion of your code.
 
J

Jason

Control has a window, so if you want to reuse a window, you'd better use a
control. Control has more design time support then component, you don't need
to write code for a lot of peoperties. Of course you can also create a
window internally in a component, like the Timer component.
 
G

Guest

Do you want a reusable Form, or reuse data entry controls on multiple forms?

The later is best implemented as a custom control.

Yes, if you want a non-UI component that you can drag onto a design serface,
derive it directly from Component.
 
F

forest demon

this validated, in my mind, what i thought i needed to do. just
wanted to make sure i was on the right track.

thanks everyone who replied....

once again, bless it be USENET! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top