CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2001
    Posts
    29

    checking for loaded form

    Is there a way to check if a specific form has been loaded without loading it?


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: checking for loaded form

    Go through the Forms collection and check the Name property. if it's the one you're looking for, you have, if you get through the whole loop and nothing, - then it's not loaded.

    dim frm as Form
    dim bloaded a boolean

    for each frm in Forms
    if frm.Name = "Form1" then
    bloaded = true
    exit for
    end if
    next

    if bloaded then
    msgbox "Form is loaded."
    else
    msgbox "form is NOT loaded."
    end if




    would that work for you?

    john

    John Pirkey
    MCSD
    http://www.ShallowWaterSystems.com
    http://www.stlvbug.org
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

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

Featured