Results 1 to 2 of 2

Thread: MDI forms and ALT F4

  1. #1

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    MDI forms and ALT F4

    I've handled the close event on my MDI child forms so that when the user attempts to close them they just get hidden. The problem I now have is that ALT F4 (which should close the entire application) just hides the MDI child that has the focus. Only when all the children have been hidden does the main application close.

    Has anybody got any ideas how I could work round this? I suppose I should really associate a class with each child form to hold its data and reload every time the form is shown. Seems like a lot of work though...
    This world is not my home. I'm just passing through.

  2. #2
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    The usual way to handle MDI control keys is to have Control-F4 close the focused child window, and Alt-F4 close the parent app regardless of the state of the child windows, although if it's a document editor type you may decide to abort the close or save some data in child windows first. Not sure how you have your event code laid out but I suspect you're using Form.Closing on the main form? If you are then you may want to rethink that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width