471,071 Members | 899 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

custom control

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

Sep 16 '07 #1
1 1495
rajendra wrote:
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
Sep 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Tinus | last post: by
21 posts views Thread by One Handed Man \( OHM - Terry Burns \) | last post: by
1 post views Thread by Wannabe_Geek | last post: by
4 posts views Thread by Smokey Grindle | last post: by
11 posts views Thread by Pete Kane | last post: by

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.