|
-
May 12th, 2007, 09:02 AM
#1
Thread Starter
Addicted Member
FindWindow And TimeOut
Hi everybody,
I just Want To ask You Guys, sometimes we want absolutly find a window before take any action:
Code:
Dim window as Long
Do
window = Findwindow("test",vbnullstring)
loop until window <> 0
' Code Continue here
However, sometimes the windows fail to appear, and the program is just freeze (unfinite loop). So my question is is there any API or function to find a window with a timeout. Let say 5 minutes, if it fail then the function will abort.
-
May 12th, 2007, 09:05 AM
#2
Re: FindWindow And TimeOut
You can just add the code which says there is no window and then exit the sub or function
-
May 12th, 2007, 09:10 AM
#3
Thread Starter
Addicted Member
Re: FindWindow And TimeOut
-
May 12th, 2007, 06:48 PM
#4
Re: FindWindow And TimeOut
You just want to keep looping the search for a whole of 5 minutes? That would be pretty memory consuming i believe.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|