At a certain point in my VB6 program, I want to check if another form is currently open (and refresh an ADO control there if it is). However, if it's not open, I want nothing to happen.
I've tried doing this with the .Visible property as follows:
It works fine in the sense that the .Refresh method only triggers if the form was visible; however, just checking the condition triggers the form's Load event and that's exactly what I want to keep from happening.
How do I check if the form is currently loaded (or visible, either will work for my situation) without triggering its Load event? Alternatively, if this is not possible, in what event would I put the code that's currently in its Load event if I want it to trigger only when the form is actually shown?
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
I've tried doing this with the .Visible property as follows:
Code:
If Form1.Visible = True then
Form1.Adodc1.Refresh
End If
It works fine in the sense that the .Refresh method only triggers if the form was visible; however, just checking the condition triggers the form's Load event and that's exactly what I want to keep from happening.
How do I check if the form is currently loaded (or visible, either will work for my situation) without triggering its Load event? Alternatively, if this is not possible, in what event would I put the code that's currently in its Load event if I want it to trigger only when the form is actually shown?
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)