-
couple questions...
I want to make a simple program using windows forms. But I don't know how to create more then one screen and then have it so when you click a button it goes to anouther screen you made. Well I need help more on the link part.
and in this simple code I got from my book, doesn't work. It says that parent isn't a word or somtin...
Code:
//...
TreeNode subNode = new TreeNode(dirSub.Name);
parentNode.Nodes.Add(subNode);
//...
It says that parent isn't a word or somthing like that and I tried capitalizing it and lots of stuff but nothing would work.
Thank you for all of your help!
-
It appears that parentNode is an instance of another type of object. If this object hasn't been properly declared (and it isn't in this code), then the compiler will not recognize it as a word.
I don't believe I've ever seen those names used in C# and they don't follow the normal C# naming style (naming conventions are always a personal preference, but all the standard C# names use CAPS to break up words. Like the code ou posted, only the P in parentNode would've been capitalized. But to get back to the point - it looks like this is a user defined object. My guess is that the book is just not giving you the complete code. Try understanding the concept and writing your own code.
-
well ectually there is like 7 pages of code. But I will look some more. Because I noticed he does do the non cap the first letter and cap the others. Probebly to keep the functions seperate from the objects. I don't know.
-
Sorry - I never saw your first question. Probably because you never ask a specific question - it's unclear what you want us to help you with. Search MSDN for example code on MDI (multiple document interface) programming, perhaps?
-
well I need to take a brake from coding.