Windows Develop Bookmark and Share   
 index > Windows Forms General > Inheriting user control from another user control (Windows application)
 

Inheriting user control from another user control (Windows application)

We have created a Windows application in which we have form containing few panels. In one of these panels we load user controls as different pages of our application which is controlled by a tab control (designed by us). The user controls (simple information pages like web pages) are inherited from another user control which is a BaseUserControl which itself is a user control & contains few basic functionality (methods) required in all user control pages.

This base user control is in a totally different project which added to our applications solution & has been referenced by our windows application project as project reference.

 

We are facing a problem while opening these user controls in designer view. When we try to open it in our designer an error message is displayed in the designer instead of user control as follows :-(

 

 

An error occurred while loading the document. Fix error & try loading document again. The error message follows:    

 

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:

 

            InheritedUserControl--- The base class ‘BaseUserControlProject.BaseUserControl' could not be loaded.  Ensure the assembly has been referenced or built if it is part of the project.

 


For your information, Our solutions have many projects (39 projects) most of them are business components whose output is set to one single projects bin directory.

 

Can anybody tell me the reason for this problem?

Thanks in advance.

 

 

Mydotnet  Monday, October 24, 2005 11:05 AM
The designed needs the assembly DLL containing your custom controls. Therefore, before opening the designed, you need to compile the project(s) containing your controls.
IMIT  Tuesday, January 10, 2006 5:43 PM
The designed needs the assembly DLL containing your custom controls. Therefore, before opening the designed, you need to compile the project(s) containing your controls.
IMIT  Tuesday, January 10, 2006 5:43 PM

You can use google to search for other answers

Custom Search

More Threads

• Moving dataGridViewRow up / down
• foreach statement
• help me :how can l get any cell of dataGridView ??
• Reading in XML
• Outlook calendar - made useful???
• Change font to Italic, Bold and Undeline at the same tiem
• "Generic" Detection of Focus Change
• problem "process cannot access the .jpg file because it is being used by another process"
• Set forms-start
• Moving an Object from one listbox to another