Thread: couple questions...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    731

    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!

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    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.

  3. #3
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    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.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    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?

  5. #5
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    well I need to take a brake from coding.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Couple of simple directdraw questions.
    By Deo in forum Game Programming
    Replies: 3
    Last Post: 05-25-2005, 07:55 AM
  2. Studying for Final, Couple Questions...
    By stewade in forum C Programming
    Replies: 4
    Last Post: 05-10-2004, 05:02 PM
  3. A couple of Questions
    By johnnabn in forum C++ Programming
    Replies: 4
    Last Post: 02-24-2003, 10:10 PM
  4. A couple of PowerPoint questions.
    By sean in forum Tech Board
    Replies: 2
    Last Post: 01-27-2003, 05:26 AM
  5. New to C++/ Couple of questions...
    By danielthomas3 in forum C++ Programming
    Replies: 13
    Last Post: 04-14-2002, 03:46 PM