Results 1 to 3 of 3

Thread: My Api Died!!!!!!!!!!

  1. #1

    Thread Starter
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    EnumWindows returns windowhandles, FindWindow uses the windowtitle as second argument, and returns the window handle of the first window found. If you load your list by enumwindows, your list contains windowhandles, and not window titles. You don't need to use FindWindow anymore, since you already have the window handle. You could use GetWindowText to get the title (if that is what you want).
    BTW if you don't want to pass the first argument, you can use vbNullString, I'm not sure if passing 0 will have the same effect.

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146
    i'm not new to enumwindows and findwindow
    and in my list, there are the windownames (i made it with getwindowtext)
    but if i want to get the handle to the windowtext (with findwindow) it doesn't work

    i have been using findwindow in almost every app, the last months..... and now, it doesn't work anymore.........

  3. #3

    Thread Starter
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    That's strange!
    Did you change anything? In your code or configuration?
    What does Err.LastDllError return?

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