Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stupid frmMDImain question. terminating program

Status
Not open for further replies.
Sep 28, 2001
55
US
how can I kill or exit the program from a child form?
The minute it runs a line like unload frmMDImain, the program hangs... thank you.

VB 6.0 (SP3)
 
I don't use MIDI's, but since they are objects of the parent form. I would imagine you should call a function in the parent form. This would exit. For instance call the function CloseProgram whixh is in your frmMDImain form. in that function just put in the line END. If this still hangs or leaves the children you might have to unload those first.

Though i would think the MIDI is a container and the children would starve and go hungry without it. Sorry I just find the Parent Child relationships in Tech talk funny.
Craig, mailto:sander@cogeco.ca

"Procrastination is the art of keeping up with yesterday."

I hope my post was helpful!!!
 
Yeah, like Craig says - you call a function in your MDI parent function that then loops through the forms collection, unloading all the child forms. Be sure to skip unloading the MDI Parent form (as it's probably not the last form in the collection), and unload it outside the loop with the usual "unload me" statement.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top