Click here to Skip to main content
13,054,615 members (67,797 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I've three forms in project. A Parent Form, a child form and a grand child form. I need to navigate from parent form to child form and then grand child form. However, in some case I need to come back to parent form from grand child form.

Please help me how to do this in

Posted 24-Apr-13 7:31am
ThePhantomUpvoter 24-Apr-13 13:45pm
What do you mean "navigate"? SDI? MID? What is it that you think a "grand child form" would be?
Sergey Alexandrovich Kryukov 24-Apr-13 13:51pm
Effectively, there are no parent-child relationships between forms, if you don't mean MDI children/parent, but you don't want to use MDI.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Do you mean that when a user presses a button on Form1, it disappears and Form2 opens.
From Form2 he can press two buttons - "Back to Form1" or "Show Form3" in which case Form2 disappears and the appropriate form is displayed? And that something similar happens with Form3?

If so, the way I would do it is to have a Hidden "parent" form, which takes requests from the three "children" and controls which instance is displayed at any one time. These requests would be in the form of Events which the "Parent" would handle, and hide and show the appropriate form instances. Sound Complex? It isn't - it's actually really simple!
Have a look at this: Transferring information between two forms, Part 3: Child to Child[^] - it's more generic than you need, but if you read "information" to means "request to show a different form" then you should get the idea.

[edit]Typos: "Form" for "from" and "your" for "you" - OriginalGriff [/edit]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 24 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100