|
-
October 15th, 2001, 09:51 AM
#1
Forms
I have a MDIForm with children. Each child has a Public function child_close(). How can call the child_close() function of all my childern whenever the MDIForm is closing. Thanks for any help I know this is a simple task.
-
October 15th, 2001, 10:21 AM
#2
Re: Forms
'this will work only in queryUnload of parent form:
'if you put this in the unload, the children will be already unloaded.
private Sub MDIForm_QueryUnload(Cancel as Integer, UnloadMode as Integer)
Dim frm as Form
for Each frm In Forms
If frm.Name <> me.Name then
If frm.MDIChild = true then
frm.child_close
End If
End If
next
End Sub
'another way: you may put the call to child_close
'in the unload event of each child
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 15th, 2001, 10:35 AM
#3
Re: Forms
Thanks alot.That worked just fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|