Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / June 2004

Tip: Looking for answers? Try searching our database.

inherited form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
e-mid - 21 Jun 2004 09:36 GMT
i have a generic form with alot of controls on it, when i inherit  a new
form, i can not see the design of my new form on the visual studio and get
an error on designtime.

Error is:

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:

form2 --- The base class 'form1' could not be loaded.  Ensure the assembly
has been referenced or built if it is part of the project.
e-mid - 21 Jun 2004 09:55 GMT
ok, i do it.
i dont know if that is right method to solve this problem: i copy the
properties that belongs to form1 (such as size) and paste to form2, now i
can see form2 on the designer.

> i have a generic form with alot of controls on it, when i inherit  a new
> form, i can not see the design of my new form on the visual studio and get
[quoted text clipped - 8 lines]
>  form2 --- The base class 'form1' could not be loaded.  Ensure the assembly
> has been referenced or built if it is part of the project.
Morten Wennevik - 21 Jun 2004 09:56 GMT
Hi e-mid,

You need a reference to form1 in your project. (In your Solution Explorer, right-click References->Add Reference ... and browse to a dll or exe where form1 is defined.

Signature

Happy coding!
Morten Wennevik [C# MVP]

e-mid - 21 Jun 2004 10:02 GMT
Morten, i do not use any dll, i just create form1 with visual studio
designer and inherit form2, my problem was i can not see form2 on the
designer, i solved it as i explained in my other post.

thnkz..

> Hi e-mid,
>
> You need a reference to form1 in your project. (In your Solution Explorer, right-click References->Add Reference ... and browse to a dll or exe where
form1 is defined.

> --
> Happy coding!
> Morten Wennevik [C# MVP]
Morten Wennevik - 21 Jun 2004 10:11 GMT
Did you use "Add Inherited Form" when creating Form2?  The inherited Form will look slightly different with a small blue arrow box in the upper left corner of all inherited controls, putting a control on Form1 should cause it to appear on Form2 too (might take a few seconds before it shows).

Signature

Happy coding!
Morten Wennevik [C# MVP]

e-mid - 21 Jun 2004 10:15 GMT
no, i dont even know about it  :) , but  i will give a try now

thnkz

> Did you use "Add Inherited Form" when creating Form2?  The inherited Form will look slightly different with a small blue arrow box in the upper left
corner of all inherited controls, putting a control on Form1 should cause it
to appear on Form2 too (might take a few seconds before it shows).

> --
> Happy coding!
> Morten Wennevik [C# MVP]
Morten Wennevik - 21 Jun 2004 10:21 GMT
Come to think of it, this way is exactly the same way as creating a new form and changing the inheritance from System.Windows.Forms.Form to Form1.  Are you sure you inherit from the correct form1 (maybe it should be  Form1 or something else)

Signature

Happy coding!
Morten Wennevik [C# MVP]

e-mid - 21 Jun 2004 11:33 GMT
yes, "add inherited form"  does the same thing i do,
i am not sure about what was wrong,
i deleted some controls on form1 on the code editor,   before inheriting
form2 , maybe the problem was about it.

anyway, there is no problem now.

> Come to think of it, this way is exactly the same way as creating a new form and changing the inheritance from System.Windows.Forms.Form to Form1.
Are you sure you inherit from the correct form1 (maybe it should be  Form1
or something else)

> --
> Happy coding!
> Morten Wennevik [C# MVP]

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.