>would somebody have a findwindow example
>so I could get the handle for showwindow call
>
>Thanks
Hi Ken,
Here's an example. I do, however, have some comments which will follow.
DECLARE INTEGER FindWindow IN Win32API;
STRING @lpClassName, STRING @lpWindowName
lnhWnd = FindWindow(0, @lctitle)
lnhWnd = FindWindow(@lcclass, 0)
In the above examples, a null string is represented by passing a zero. In the case where the class is null, all windows classes match. However, the title bar must match exactly in terms of case and context. In the second example, all window title bar text match, but the class name must match exactly.
Trying to retrieve a window handle based on the class name, is not only tricky (many applications have a number of windows associated with them), and class names are subject to change between versions.
Using the title bar text can be a problem since most applications have dynamic title bars. I've posted a file in the download section (Is_Run and Is_Run32) that finds a window handle bassed on the known portion of the title bar. You might want to take a look.
hth,
George
Ubi caritas et amor, deus ibi est