k_zeon
8/7/2012 8:32:00 PM
I can use the find API function to check for a form name and if found get the child objects, this works ok.
What i have done already is to check if a form window is open and get the hwnd.
i then issue a sleep api for 400ms and then continue to do other things ,then open another window using API etc.
Basically Open 1 form enter info click button then open another form and enter more info click button, then exit out of all forms.
I dont really want to use sleep API as some systems are slower than others.
What i thought about doing is using a Do Loop to check if the form window has been opened before continueing.
ie Click button to process XYZ. Check if Form is open, if not loop until form is open then continue. However this does not work as expected.
Once i click the button and the loop starts, i then open ie Form1 but my app does not see it open until i click somewhere on my app then amazingly Form1 is found
Do While xxxxx = 0
xxxxx = (FindAnyWindow&(Me, "Form1"))
DoEvents
Loop
if you need more code then let me know
thanks
Garry