Results 1 to 2 of 2

Thread: Find another form?

  1. #1

    Thread Starter
    Fanatic Member JPicasso's Avatar
    Join Date
    Aug 2001
    Location
    Kalamazoo, MI
    Posts
    843

    Find another form?

    Okay, I've just started playing with this new toy and have managed to
    say "Hello world" um, 13 or so times. much fun.

    I see how to open a form with .showdialog, but
    how do I find instances of forms that may already be visible?

    i.e. we have several forms that get loaded at several points in our application.
    what they apply to depends on where they were opened....
    they could be opened via modal or not modal.

    but, at somepoint in our app we go see if this form is shown, if
    so, we
    bring that to the operators attention so he can finish the old operation or abort.

    how would I do somthign liek this? I don't want seven of the same forms
    floating all over my application.
    Merry Christmas

  2. #2
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    ok i need a clearer picture than that

    Are we speaking of multi instance of the same form or are we speaking of multi forms..? either way it should be simple enough to do depending on what your code is like now

    if you are making mult of the same form make a type in a module

    Code:
    Public Type
        FormName As String      'umm name
        FormID as Integer        'just a number
        Form Loaded as Boolean  'still open..? this one is the most important
    End Type
    then at an iterval of your choosing loop through it and check the status of your forms and clean out any that aren't loaded so you don't get bogged down this is usually done for mdi application that have lots of the same document (form) open
    Magiaus

    If I helped give me some points.

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