Results 1 to 4 of 4

Thread: How to Close All Open Forms Except the Midi

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381
    I have an application that I need to close all open forms with the exception of the midi form. Basically this would work like a midi text editor that allows multiple form to be opened at the same time. I want to give the user the ability to close all forms at once if he so desires.

    I have seen and tried several pieces of code that does this but it also shuts down the midi form and I want it to remain open.

    Thanks,
    Rev. Michael L. Burns

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Code:
    dim myform as Form
    for each myform in Forms
      if myform.name <> "MDIFORM1" then
        unload myform
      end if
    next
    Hope this helps,

  3. #3
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    i've never used MDI forms, but this MAY work

    dim Frm as form

    for each frm in forms
    if frm.mdichild = true then
    unload frm
    endif
    next frm

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381

    How to Close All Open Forms Except the Midi

    Negative0 & Jimbob,

    Thanks, Looks like either of these should work great.

    Jimbob, I agree. I usually don't use MDI forms but this particular project requires it.

    Thanks again,
    Rev. Michael L. Burns

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