Disable Close Option on MDI Parent, Enable on Child
Posted on 2002-03-15
I'm trying to make a menu editor that functions similar to the way that MS Office apps do. I have a File/Close menu option in the MDI application, but I can't figure out how to code it.
If the user clicks close (or uses the shortcut) I want to close the MDI child that has focus. And, I want the close option to be disabled if the MDI parent is the only thing open.
Right now, the close option is enabled on all forms (both parent and child). Also, if I put an Unload Me in the Click event of mnuClose, the MDI parent unloads, thereby unloading the application - rather than unloading the child form that has focus.