Issue with disposed event of MDI Parent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eddyman592
    New Member
    • Apr 2007
    • 20

    Issue with disposed event of MDI Parent

    I'm writing an application using an MDI Parent and 2 children. When the user closes the parent, I would like to have the program check something in one of the children, and then ask whether or not the user wishes to continue.

    I have tried testing the Disposed event by having a MessageBox.Show show a window that simply said "Closing!", but when you close the parent, all you hear is the ding that a message box makes, but then it continues closing and you never see the message.

    If someone has help, Please help me. Sorry, I'm very new to VB.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    How/where did you show the dialog? Seems as though the QueryUnload event procedure on the parent form would be the place to check.

    Comment

    • eddyman592
      New Member
      • Apr 2007
      • 20

      #3
      I'm trying to show the message in the form1.disposed event. Basically, what i'm trying to do is like the "There are unsaved documents, do you wish to save?" box that pops up when you try to close Microsoft word. Except the program just keeps on closing.

      I don't see a function called QueryUnload in the function list of the form. Like I said, I'm quite new to this.

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by eddyman592
        I'm trying to show the message in the form1.disposed event. Basically, what i'm trying to do is like the "There are unsaved documents, do you wish to save?" box that pops up when you try to close Microsoft word. Except the program just keeps on closing.

        I don't see a function called QueryUnload in the function list of the form. Like I said, I'm quite new to this.
        Well, we may be talking about different versions of VB, in which case the details will probably differ significantly. In VB6 (and earlier) the form has a QueryUnload and an Unload event. Whether this applies to the child form, I don't know.

        Comment

        • eddyman592
          New Member
          • Apr 2007
          • 20

          #5
          oh. I'm using VB 2005, the newest one. And i've heard that they are pretty different

          Comment

          Working...