CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1

    Determine if a form is loaded?

    How do I determine if a form is loaded? I tried to use

    if form.visible = true then
    'code here
    end if




    but that caused the form's load sub routine to be executed and I can't have that. Someone out there have a good idea?


  2. #2
    Join Date
    Jan 2000
    Location
    Colorado
    Posts
    9

    Re: Determine if a form is loaded?

    You have to iterate thru the forms collection:

    public Function FormLoded(sFormName as string) as Boolean
    Dim frm as form
    for each frm in forms
    if frm.name = sFormName then
    FormLoaded=true
    exit function
    end if
    next 'frm
    end function



    If the name is not found then FormLoaded=False
    Jared Youtsey


  3. #3

    Re: Determine if a form is loaded?

    Worked great,thank you.


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