To check whether form is loaded....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sumuka
    New Member
    • Oct 2007
    • 38

    To check whether form is loaded....

    Hello,

    I'm doing a vb6 project in which i've a flexgrid and when the user clicks on the 3rd column 1st row a new form (frm.edit) will open and this form displays some data now when i want click the next row i will have to close the frm.edit.
    But i want to check whether the form is loaded and if it's loaded then i should be able to click on flexgrid's next row without closing the frm.edit but the values inside the frm.edit should change accordingly.

    How to get this?
    Please help.

    Thanks in anticipation,
  • 9815402440
    New Member
    • Oct 2007
    • 180

    #2
    Hi.
    Use following code to check whether form is loaded or not

    [CODE=vb]Dim f
    For Each f In Forms
    If f.Name = "your form name" Then
    ' form is loaded
    End If
    Next[/CODE]

    Regards,
    manpreet singh dhillon hoshiarpur.
    Last edited by Killer42; Oct 25 '07, 11:20 PM. Reason: Added CODE=vb tag

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      You could also create a Public variable which is set in the Form_Load event, and cleared in the Form_Unload event. That way, this variable will always tell you whether the form is loaded.

      Comment

      Working...