The base class could not be loaded

I have created a simple project with two forms: 'form1' and 'baseform'

When I tried to inherit 'form1' from 'baseform' (Inherits baseform), the IDE displayed the following error message  :
----------------------------------------------------------------------------------------------------------------------------------------------
An error occured while loading the document. Fix the error, and then try loading the document again. The error message follows:

The disigner could bot be show for this file because none of the classes within it can be dsigned. The designer inspected the following classes in the file:

Form1 --- The base class 'Project.baseform' could not be loaded. Ensure the assembly has been referenced or build if it is part of the project.
------------------------------------------------------------------------------------------------------------------------------------------------

However the project still can run properly!

Thanks in advance.

vbhahaAsked:
Who is Participating?
 
Computer101Connect With a Mentor Commented:
PAQed, with points refunded (300)

Computer101
E-E Admin
0
 
Éric MoreauSenior .Net ConsultantCommented:
This is because you have some code in one the events raised when a form is loaded (Load, Activate, Paint, ...) in the PARENT class that cannot be evaluated for the designer.

Remove this code from these events and your child will appear correctly.
0
 
vbhahaAuthor Commented:
No, both form1 and baseform are simple blank form.

Anyway, I have solved the problem already. The solution is to rebuild the project before the form designer can display the inherited form!
0
 
vbhahaAuthor Commented:
Why I couldn't close this question ???
0
 
Éric MoreauSenior .Net ConsultantCommented:
You will have to ask the Community support
0
All Courses

From novice to tech pro — start learning today.