Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

custom control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rajendra - 16 Sep 2007 09:57 GMT
hi i am rajendra i am posting my first question to this group i have
doubt from last few days .i want to clear it

why we need user control and wher  should we use  it,and the execution
of the user defined control. please let me know
Peter Duniho - 16 Sep 2007 19:56 GMT
> hi i am rajendra i am posting my first question to this group i have
> doubt from last few days .i want to clear it
>
> why we need user control and wher  should we use  it,and the execution
> of the user defined control. please let me know

Typically you'd use a UserControl where what you want is a composite of
existing controls.  You'd create an instance of the UserControl either
by creating it standalone as a new item in your project, or by simply
dropping a new UserControl instance on your Form.

If you do the former method, it's similar to creating a Form-derived
class.  You get a whole new class, which you can then reuse in any
number of forms.  You can even put it in its own project and reuse it in
multiple projects.

Don't confuse a UserControl with a "custom Control", which is a
completely customized class derived from Control, in which you
completely define the behavior of the class.  A UserControl brings along
with it some default behavior that is especially useful when composing a
new control that itself contains several other controls.

Pete

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.