all groups > dotnet windows forms designtime > june 2004 >
You're in the

dotnet windows forms designtime

group:

inherited form


Re: inherited form Morten Wennevik
6/21/2004 10:56:35 AM
dotnet windows forms designtime:
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!
Re: inherited form Morten Wennevik
6/21/2004 11:11:08 AM
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!
Re: inherited form Morten Wennevik
6/21/2004 11:21:51 AM
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!
inherited form e-mid
6/21/2004 11:36:40 AM
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.



Re: inherited form e-mid
6/21/2004 11:55:39 AM
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.


[quoted text, click to view]

Re: inherited form e-mid
6/21/2004 12:02:13 PM
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..

[quoted text, click to view]
right-click References->Add Reference ... and browse to a dll or exe where
form1 is defined.
[quoted text, click to view]

Re: inherited form e-mid
6/21/2004 12:15:50 PM
no, i dont even know about it :) , but i will give a try now

thnkz

[quoted text, click to view]
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).
[quoted text, click to view]

Re: inherited form e-mid
6/21/2004 1:33:41 PM
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.


[quoted text, click to view]
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)
[quoted text, click to view]

AddThis Social Bookmark Button