473,385 Members | 1,829 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,385 software developers and data experts.

component/control design differences

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

Jun 27 '07 #1
4 3528
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.

forest demon wrote:
my first thought is to create a custom control to accomplish this.

can someone explain the differences (that are not obvious) between the
custom control class and the component class.
Jun 27 '07 #2
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.

"forest demon" <me********@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
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

Jun 27 '07 #3
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.

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"forest demon" wrote:
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

Jun 27 '07 #4
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! :-)


Jun 27 '07 #5

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

Similar topics

0
by: Jason | last post by:
What interface do I need to implement in order to get a component with a public property to show up in the data binding drop down boxes at design time in VS.net? I've tried to look just about...
2
by: Marcin Grzębski | last post by:
Hi All, How to create *component* class which do now show its instance in a component bar? I want to create other class, this *component* instance collection and i know how to show that...
0
by: David | last post by:
Hello I have made a component (MyWebForm) that inherits Page. This component have a method called 'ComponentAdded' that shows a msgbox if it is in design mode: Public Class MyWebForm Inherits...
0
by: Ken Dopierala Jr. | last post by:
Hi, When I change properties through the property window on my custom control and then move focus from that property cell VS.Net runs the GetDesignTimeHtml() method on my designer. When I...
8
by: YunusEmre | last post by:
Hi, I have a class named MyDataAdapter that derives from System.ComponentModel.Component and it contains all of my SqlDataAdapter objects(around a 100). How can I find a SqlDataAdapter in the...
5
by: news.microsoft.com | last post by:
Does anybody know if there is a component like the new outlook 2003 inbox. It has a really good drop down grouping feature, and visually looks very good. Thanks
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
7
by: Joe | last post by:
Is it possible to have a component which is global to the entire application? I need to have a single component act sort of like a server which components in any of the forms can access. For...
2
by: alberthung01 | last post by:
Hi all, I wrote a component with ComponentDesigner to let users drag and drop it to WebPage from toolbox directly. Just like the behavior of dataAdapter. But it works fine on ASP.NET 1.1 but not...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.