Solved

The base class could not be loaded

Posted on 2004-09-26
6
419 Views
Last Modified: 2008-01-09
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.

0
Comment
Question by:vbhaha
  • 2
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 12158700
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
 

Author Comment

by:vbhaha
ID: 12159361
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
 

Author Comment

by:vbhaha
ID: 12159623
Why I couldn't close this question ???
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 12159734
You will have to ask the Community support
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12208289
PAQed, with points refunded (300)

Computer101
E-E Admin
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question