473,395 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how do you call a child form from another child form?

Here is my situation...
i have a parent window/ main app and i call a child form (type 1). the child
form(type 1) gets information from a database. the user makes some choices
and then some data is sent to the next child form(type2). i am having
problems making this work.

I have tried instantiating the second child form right after the first from
the parent window. this brings up both at the same time.

i have put the code for instantiating the second form in the first forms
exit function. this makes the second form it's own parent form.

when i'm in the first form i can't seem to get the parent so that i can find
the second form and show it. does any one have any ideas.

if i have all the code with in the parent form is there a way to make the
code stop until the first form has finished ?
Nov 20 '05 #1
2 2131
Use ShowDialog() instead of just Show(). That'll stop processing in the
calling sub until the form is closed or otherwise disposed.
____________________________________
The Grim Reaper

"SHAWN DEB ECKLEY" <s.******@verizon.net> wrote in message
news:QQ******************@nwrddc01.gnilink.net...
Here is my situation...
i have a parent window/ main app and i call a child form (type 1). the child form(type 1) gets information from a database. the user makes some choices
and then some data is sent to the next child form(type2). i am having
problems making this work.

I have tried instantiating the second child form right after the first from the parent window. this brings up both at the same time.

i have put the code for instantiating the second form in the first forms
exit function. this makes the second form it's own parent form.

when i'm in the first form i can't seem to get the parent so that i can find the second form and show it. does any one have any ideas.

if i have all the code with in the parent form is there a way to make the
code stop until the first form has finished ?

Nov 20 '05 #2
Hi Grim
I tried that and i got an error. because i'm making the forms child i
can't use the showdialog() it only works with top level forms.

shawn
"The Grim Reaper" <gr*********@btopenworld.com> wrote in message
news:cc**********@hercules.btinternet.com...
Use ShowDialog() instead of just Show(). That'll stop processing in the
calling sub until the form is closed or otherwise disposed.
____________________________________
The Grim Reaper

"SHAWN DEB ECKLEY" <s.******@verizon.net> wrote in message
news:QQ******************@nwrddc01.gnilink.net...
Here is my situation...
i have a parent window/ main app and i call a child form (type 1). the

child
form(type 1) gets information from a database. the user makes some choices and then some data is sent to the next child form(type2). i am having
problems making this work.

I have tried instantiating the second child form right after the first

from
the parent window. this brings up both at the same time.

i have put the code for instantiating the second form in the first forms
exit function. this makes the second form it's own parent form.

when i'm in the first form i can't seem to get the parent so that i can

find
the second form and show it. does any one have any ideas.

if i have all the code with in the parent form is there a way to make the code stop until the first form has finished ?


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: VM | last post by:
I would like to display a child form inside of an MDI but the problem is that I'll be invoking that child form from within another child form. If I use this code: frmReportViewer frmReportViewer =...
5
by: Steven C | last post by:
Hello: I've seen several recent threads on this, but I'm still not clear how to reference a *method* on one form from another. I want to add a customer in the child form, and then update the...
3
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent...
2
by: Paul | last post by:
Hi this is related to a previous post, hopefully just a bit clearer description o the problem. I have a parent form that opens a new form (child form) while still leaving the parent form open....
2
by: QT | last post by:
Dear Sirs, I made a MDI Parent form and two MDI child form. I can open MDI child form from MDI parent form with; Dim UserChangePassword_Form As New UserChangePassword 'Set the Parent Form of...
2
by: JohnR | last post by:
Let's say I have an MDI parent form with a textbox. If I create an MDI child form and, at runtime, move the MDI child window over the textbox on the MDI parent, the textbox appears in front of the...
3
by: jimcolli | last post by:
I have a parent form with a menu button that has a handler. I want to call this same handler when a button on a child form is clicked. I have this simplified code in the main form's Load...
7
by: Sheikko | last post by:
Hi all, i have an application and i wan to call another program into it, like notepad, so when i minimize the notepad, or maximize, it must rest in my application. thank you
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.