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

Designer doesn't work after overriding base class

Hi,

I have a class (say O1) that overrides
System::Windows::Forms::UserControl and then another one that overrides
O1 (call it O2). O2 used to work with the Designer as it was inheriting
directly from UserControl (and was created using the wizard) but since
I inserted O1 into inheritance tree (without resx, straight override) I
get the error pasted at the bottom when trying to open O2 in Designer.
I deleted the NCB file to no avail. Everything builds and runs just
fine. Can anyone help? Thanks.

The designer could not be shown for this file because none of the
classes within it can be designed. The designer inspected the following
classes in the file: O2 --- The base class 'O1' could not be loaded.
Ensure the assembly has been referenced and that all projects have been
built.
Hide

at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocument(IDesignerSerializati onManager
manager)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad(IDesignerSerializationM anager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.PerformLoad(IDesignerSer ializationManager
serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDesignerLoaderHost
host)

Jul 2 '06 #1
1 4662
The designer is looking for it's IntializeComponent method and all the code
that it has added. If it can't find that, or it isn't in the structure it
expects (e.g. you've edited it) it will fail.

Basically, the Designer doesn't support use of a derivation of a derivation
of UserControl.

--
http://www.peterRitchie.com/
Microsoft MVP, Visual Development - C#
"du****@gmail.com" wrote:
Hi,

I have a class (say O1) that overrides
System::Windows::Forms::UserControl and then another one that overrides
O1 (call it O2). O2 used to work with the Designer as it was inheriting
directly from UserControl (and was created using the wizard) but since
I inserted O1 into inheritance tree (without resx, straight override) I
get the error pasted at the bottom when trying to open O2 in Designer.
I deleted the NCB file to no avail. Everything builds and runs just
fine. Can anyone help? Thanks.

The designer could not be shown for this file because none of the
classes within it can be designed. The designer inspected the following
classes in the file: O2 --- The base class 'O1' could not be loaded.
Ensure the assembly has been referenced and that all projects have been
built.
Hide

at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocument(IDesignerSerializati onManager
manager)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad(IDesignerSerializationM anager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.PerformLoad(IDesignerSer ializationManager
serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDesignerLoaderHost
host)

Jul 3 '06 #2

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

Similar topics

22
by: Ron_Adam | last post by:
Hi, Thanks again for all the helping me understand the details of decorators. I put together a class to create decorators that could make them a lot easier to use. It still has a few glitches...
3
by: emerth | last post by:
Suppose I have these 4 typedefs, where each of the 2nd parameter in each is a simple class that just contains a different number of strings: typedef map < char*, cctrlrec_data, ltstr >...
1
by: S Guiboud | last post by:
I want to subclass the System.Web.UI.UserControl to make a common control for my site. Then, when I create a new UserControl from the Visual Studio I changed the base class...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
14
by: Dave Booker | last post by:
It looks like the language is trying to prevent me from doing this sort of thing. Nevertheless, the following compiles, and I'd like to know why it doesn't work the way it should: public class...
2
by: dusanv | last post by:
Hi, I have a class (say O1) that overrides System::Windows::Forms::UserControl and then another one that overrides O1 (call it O2). O2 used to work with the Designer as it was inheriting...
0
by: silkodyssey | last post by:
I recently installed the release version of visual c#2008 and I decided to test it with a wpf application. I tried dragging controls to the form but it doesn't work, the controls do not appear on...
1
by: almurph | last post by:
Folks, Hope you can help me with this one. I have a winform which I cannot view in design mode. A ll I can see is a big red "X" and the following following error message: " The designer could...
6
by: Peter Morris | last post by:
If I create a new ASP.NET website and then click the tab at the bottom the IDE freezes. Last night I uninstalled VS2008 and all other related installations (MVC framework etc), this morning I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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
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
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...
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...

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.