Board index » delphi » help on findwindow (API)

help on findwindow (API)

I'd like to get the handle of an app that's running (ex: notepad)

I use this function : FindWindow('0', 'Notepad')
but it always respond the 0 value. I've changed to various string, but
unsuccessful....

Could semeone help me ?

Please respond me by email, thanks.

 

Re:help on findwindow (API)


Quote
a...@FranceNet.fr (Arnaud Roudsovsky) wrote:
>I'd like to get the handle of an app that's running (ex: notepad)

>I use this function : FindWindow('0', 'Notepad')
>but it always respond the 0 value. I've changed to various string, but
>unsuccessful....

The first parameter to FindWindow is a window class name and the second is a caption.  The
code above is literally searching for a window with the class name of '0' and a caption
of 'Notepad'.  Pass Nil instead of '0' if you want to search for a window with any class
name whose caption is 'Notepad'.

     -Steve Teixeira
      steix...@borland.com

Other Threads