cSearchFor = UPPER(ALLTRIM( "YourMainWindowCaption" )) nHWnd = GetDesktopWindow() && API nHWnd = GetWindow(nHWnd, 5) && API - Get first child window nNext = 2 lFound = .F. cTitleBar = "" do while NOT lFound if NOT EMPTY(nHWnd) cTitleBar = SPACE(200) + CHR(0) nTextLen = GetWindowText(nHWnd, @cTitleBar, 200) && API cTitleBar = UPPER(LEFT(cTitleBar, nTextLen)) lFound = (cTitleBar = cSearchFor) if NOT lFound nHWnd = GetWindow(nHWnd, nNext) && API endif else lFound = .T. endif enddo return (lFound)The API call declarations are all that you'll need to get that working, but they're easy to find on news2news.