473,385 Members | 1,597 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,385 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 4653
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
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
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,...

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.