473,403 Members | 2,284 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,403 software developers and data experts.

Can VS2005 Designer handle Generic Inherited Components?

Hi,

I am trying to do inherit my component from, let's say, a ListBox, and make
it generic:

namespace WindowsApplication1
{
public class GenericListBox<T: ListBox
{
...
}
}

My form is defined this way:

namespace WindowsApplication1
{
partial class Form1
{
private void InitializeComponent()
{
this.listBox1 = new GenericListBox<int>();
................
}

private GenericListBox<intlistBox1;
}
}

The project builds fine, but I can not open the form in the design mode:

"Could not find type 'WindowsApplication1.GenericListBox'. Please make sure
that the assembly that contains this type is referenced. If this type is a
part of your development project, make sure that the project has been
successfully built."

If I remove the <Tpart from the component's definition and rebuild, it
opens the form in the designer fine.

Is there any way to avoid manual editing of the form's designer code in this
situation?

Thank you in advance!
Mar 1 '07 #1
0 1017

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

Similar topics

3
by: Philippe Trottier | last post by:
Hi! I have a C# program developped with VS2003 and Enterprise Library June 2005. I converted it to VS2005B2, recompiled Enterprise Library to VS2005 and now I'm stuck with a bug when my program...
2
by: Lauchlan M | last post by:
Hi. Following the example at http://www.codeproject.com/useritems/ooaspnet.asp?print=true, I have a datagrid descendant class that shows a JavaScript confirm dialog before deleting a row from...
8
by: Rob Dob | last post by:
The following code works fine when executed, however will not display correctly within the VS2005 Designer, why is this? is this a bug? it works fine in VS2003, If I move the ASP:Panel to also...
7
by: Dino Buljubasic | last post by:
I am having a problem when trying to view a form in desing view. If a form has any error or warning, the design view will not open the form. Anybody knows how to fix this error? Thank you...
2
by: amyl | last post by:
I have added some user scope level variables in my Windows Forms Application. However, I can't seem to access them. >From the doc's I found that you should be able to access them via...
0
by: walter | last post by:
Hi there, I created a few custom controls, but after I move the tags into theme folder, when I move to designer view, it give me either black/white or nothing at all. I'm wondering if there is a...
1
by: mehdi | last post by:
Hi folks, Consider a custom class that's being derived from the TextBox and has got the following propert: public override string Text { get { return "get"; } set {base.Text = "set";} }
0
by: =?Utf-8?B?SGVsZ2U=?= | last post by:
Hi! I have run into a problem with visual inheritance using the VS2005 designer for Windows Forms. My goal is to put business logic and common rules for our controls into its own layer (base...
1
by: sklett | last post by:
I'm curious if anyone has encountered this. I'm developing an outlook add-in that needs to display a PDF. I've included the Adobe Reader ActiveX cotnrol and when I re-load the form I get the...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.