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

  • Thread starter Thread starter SHAWN DEB ECKLEY
  • Start date Start date
S

SHAWN DEB ECKLEY

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 ?
 
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
 
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
 
Back
Top