Results 1 to 4 of 4

Thread: Close MdiChildren

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    \root
    Posts
    32

    Close MdiChildren

    I've got this application that has a MdiParent window in which multiple child forms are opened . I want to close all these forms when the user logs off. Any idea how to do this ?
    The part in which the menu gets enabled on sign-in and sign-out works fine but I wanna close all the windows opened up by the previous user .... how do I do this ?
    ** Praise none, but the CREATOR **
    ---------------------
    T-break SUX

  2. #2
    Junior Member husain's Avatar
    Join Date
    Jul 2002
    Location
    United Arab Emirates
    Posts
    31
    VB Code:
    1. Dim FRM AS Form
    2. For Each FRM in Me.MdiChildren
    3.   FRM.Close
    4. Next

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Well , how about closing many forms(not MDI)using For - Each clause??

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    \root
    Posts
    32
    coolio ..... that works just fine husain. Thanks
    ** Praise none, but the CREATOR **
    ---------------------
    T-break SUX

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