473,473 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Inherit from UserControl vs Control

I've created my own abstract control inheriting it from Control instead of
Usercontrol. All works fine but anyone who inherits from my control cannot
design their own control. Do I need to add an attribute to tell the IDE that
my control is designable?

Thanks,
Michael
Apr 19 '06 #1
2 4604
Hi Michael,

What you're talking about is Design-time support, and extending Design-time
support, which is done by a combination of Design-time attributes and custom
Designer and related classes.

This is a pretty extensive topic. I'm going to give you some starting
reference points:

http://msdn2.microsoft.com/en-us/lib...59(VS.80).aspx
http://msdn2.microsoft.com/en-us/lib...zc(VS.80).aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
"Michael C" <no****@nospam.com> wrote in message
news:O0**************@TK2MSFTNGP05.phx.gbl...
I've created my own abstract control inheriting it from Control instead of
Usercontrol. All works fine but anyone who inherits from my control cannot
design their own control. Do I need to add an attribute to tell the IDE
that my control is designable?

Thanks,
Michael

Apr 19 '06 #2
Michael C wrote:
I've created my own abstract control inheriting it from Control instead of
Usercontrol. All works fine but anyone who inherits from my control cannot
design their own control. Do I need to add an attribute to tell the IDE that
my control is designable?


The IDE designer needs to create an instance of the base class of the
control you are trying to design. Since it is abstract, the designer
obviously fails. I could not beat it, had to convert abstract methods
to just virtuals.
Apr 19 '06 #3

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

Similar topics

5
by: Steve | last post by:
Visual Studio 2003 .Net / C# I have a 2 page Tab Control for users to add a Job in my application. The first page is for them to choose which type of Job they would like. The type of Job...
6
by: Mohammad-Reza | last post by:
I wrote a component using class library wizard. In my component i want to in order to RightToLeft property do some works. I can find out if user set this property to Yes or No, But if He/She set it...
8
by: Issac | last post by:
Hi, I created an Inherit UserControl which inherits textbox with additional property say 'Type'. I used in my forms and everything works fine. But afterward, I want to remove (or rename) such...
5
by: Jim Hubbard | last post by:
I have created a simple usercontrol that adds functionality to the webbrowser control (let's call it ctrl1). I would like to add it to another usercontrol I am creating (let's call it ctrl2), but...
3
by: Station Media | last post by:
Hi everybody, I need to create a custom button for all our internal applications, and i would like to know what is the best for this type of control(button), is it to inherit standard button or...
3
by: Guillaume Hanique | last post by:
Hi, I feel very stupid. I simply want to derive a control from system.web.ui.webcontrols.button and use that on my webform, but I just can't get it done. Can anyone tell me how to do that? I...
2
by: Joe | last post by:
Is it possible to inherit from a UserControl? If I try my user control class is not recognized. Thanks, Joe
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.