Results 1 to 4 of 4

Thread: FindWindow And TimeOut

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Posts
    230

    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.

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: FindWindow And TimeOut

    You can just add the code which says there is no window and then exit the sub or function

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Posts
    230

    Re: FindWindow And TimeOut

    timeout ?

  4. #4
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    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
  •  



Click Here to Expand Forum to Full Width