Results 1 to 3 of 3

Thread: mdi closing question

Threaded View

  1. #3
    Hyperactive Member scuzymoto's Avatar
    Join Date
    Aug 1999
    Location
    Washington State
    Posts
    316

    FYI

    Owned forms only refers to forms that are in the owned forms array which will only inlcude mdi children if they are not currently open. To access mdi children regardless of weather they are open or not you must use the mdichildren property. I use the following code to close all open children of an mdi parent.

    Code:
                Try
                    Do While True
                        Me.MdiChildren(0).Close()
                    Loop
                Catch
                    'this exits the loop when you reach the end of the array
                End Try
    When you close each form the next one takes its place as element 0 and gets closed the next time through the loop until there are no more to close at which point the catch statment exits the loop for you.
    Last edited by scuzymoto; May 7th, 2003 at 12:48 PM.
    SCUZ

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