>Ok, that worked for Notepad. In my test for my app, I have:
>
>
>tcwindow = "Spot Media Tracking System - Kevin Marois"
>
>lnhwnd = FindWindow(0,tcwindow)
>
>
>
>and FindWindow is returning Zero
>
>I added GetLastError, which returned 127. From my VB API Guide, I read
>that to be:
>
>* The specified procedure could not be found.
>#DEFINE ERROR_PROC_NOT_FOUND 127
>
>Any ideas on this?
The one thing that is kind of a pain is that FindWindow has to have EXACTLY the same string as what the window has. If it doesn't, it won't find the window. Make sure the case is correct and that you don't have any additional spaces at the end of the window name, or embedded control characters (in VFP).