Help!!! Getting Enumwindows To Work

BOWIEM
01-02-2005, 12:16 PM
I am relatively new to VB and am making my first foray into using API's. I have a project that I am working on that requires me to access an open window. I cannot get the handle for the window through GetWindow() because the titlebar text for the target window will be different each time that I run the program and I am unsure what the class for the program is.

I am hoping to use Enumwindows() to get a listing of the titlebar text for open windows on my computer into an array. I could then use string functions to compare the items in the array to text that I know would be in the target window that I am searching for.

The problem is that I am having a heck of a time getting the Enumwindows API to work. Is there anyone out there who could step me through it? I would really appreciate it! Thanks.

OnErr0r
01-02-2005, 12:18 PM
Make sure you use the correct callback procedure signature. And make sure you return true if you want to continue enumerating. Return false when done.

subzero0000
01-05-2005, 01:44 PM
what is happening, I post a solution this morning and it's gone now. :confused:

OnErr0r
01-05-2005, 02:09 PM
what is happening, I post a solution this morning and it's gone now. :confused:

The original poster trying to use EnumWindows API, which requires an EnumWindowProc. Once he responds back (if he ever does) then we can help him with his quest. I didn't post the actual proc and code as I'm sure it already exists on this board.

subzero0000
01-05-2005, 02:41 PM
i see, ok...

BOWIEM
01-08-2005, 12:20 PM
I tried using the enumwindows again and I'm still running into problems. I should tell you also that I am working on VB.Net which I have been told handles API calls differently than previous editions of VB. Thanks for the help.

OnErr0r
01-08-2005, 01:29 PM
The main difference is using a delegate for your callback. What do you have so far?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum