Designer doesn't work after overriding base class

D

dusanv

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.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager
manager)
at
System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost
host)
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top