Link to home
Start Free TrialLog in
Avatar of Declan Basile
Declan BasileFlag for United States of America

asked on

Adding Existing Item to vb.net Project causes Errors

I imported a Windows Form from a VB.net Windows Forms Application project into a vb.net Class Library project by adding an existing item and selecting the corresponding .vb file for the form.  (Note: Visual Studio imported the associated ".designer.vb" and the ".resx" files along with the selected ".vb" file.)  Now when I try to open the form in the form designer I get the error "The designer cannot process unknown name 'SuspendLayout' at line 37."  I didn't manually change any of the code in the designer.vb file.  Why am I getting this error?
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Declan Basile

ASKER

No I did not, and it fixed my problem by adding the reference.  Thank you.  Now I have another problem.  (If you prefer that I start another question for this please let me know).  I created a Class that inherits the class ("SelectItems") from the other project (AltekVB) that I linked to (add link to existing item), using the statement "Inherits SelectItems".  My current project is named "TrainingMatrix", and the project containing the linked class item is named "AltekVB".  I don't receive any errors in code, but when I try to open the derived form I get the error "TrainingMatrix.SelectItems" not found.  In code it recognizes the base class.  Why won't it recognize it when trying to open the derived class in form designer? (Note: I tried "Inherit AltekVB.SelectItems" and it didn't work)
Yes, please do open a new question for this. When you open the new question please post the base class and the class that inherits from it as well as where you are trying to use it.

Thank you and please close this question.
Thank you.