Slippery Posted January 16, 2006 Posted January 16, 2006 (edited) Hi.. After installing the .net 2003 and loading my project (orginally coded in 2001) everything seemed fine until I added a new windows form to the project. The new form is fine (designer and code are all there) but whenever I try and instantiate the new form from my original "menu" form .net can't find it (either in the IDE intellisense or at runtime). The new form is definately in the same project (and the same namespace etc..) as the "menu" calling form, it's shown in the IDE under the project and I can edit it both in design and code and everything looks great.. until I try to use it that is, like so Form nextMenu = new frmNew(); at which point (when I type "frmNew") .net seems to think the new form (frmNew) doesn't exist and ignores it totally both in the IDE and at build time. Is this a bug with 2003 or is there something more obvious I'm missing ? Has anyone else had this problem ? Thanks Slippery Edited January 16, 2006 by Slippery Quote
Administrators PlausiblyDamp Posted January 16, 2006 Administrators Posted January 16, 2006 Could you attach the project - or at least a simple example that demonstrates this behaviour? Also if you open the file that declares the frmNew class - does it contain any explicit namespace declarations? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Slippery Posted January 16, 2006 Author Posted January 16, 2006 Hi.. I've compared the code for a form that works and the one that doesnt and it's identical. Each form is a standard form class inherited from Windows Forms. There is nothing strange about them as far as I can see. I'll cut the project down and post a copy of it to see if anyone has the same behaviour. To confuse this even further.. I add a new form in the designer to the project (nothing more added to it at all.. everything was left as it was created) and I can't see that one either when I try to instantiate it (it's in the designer, code view and project list) Strange ! Slippery Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.