..... code above to prepare to run wHccGet.exe a webservice and lcEXE the parameter string to give to wHccGet.exe.... DECLARE LONG ShellExecute in "shell32.dll" long hwnd, string lpszOp, ; string lpszFile, string lpszParams, ; string lpszDir, long nShowCmd ShellExecute( 0, "open", SYS(5) + CURDIR() + "WHccGet.exe", lcEXE, SYS(5) + CURDIR() ,2) CLEAR DLLS "ShellExecute" *TMT 05/30/08 Wait for return file with data from datawarehouse.... if not back in 20 seconds, then show *failure and allow to try again..... ltStart = DATETIME() lbFileExists = .f. DO WHILE (DATETIME() - ltStart) < 21 Thisform.pgfFSN.pageFSN.edtStatus.Value = "Waiting for response from Frequent Shopper - " + STR((DATETIME() - ltStart),3,0) + " seconds elapsed." IF FILE("C:\POSTEMP\" + lcDateTime + lcDecimalSeconds + '.FRQ') lbFileExists = .t. EXIT ENDIF ***************** *here is where I look for the ESC key.... but the focus is on the wHCCGet webservice which is minimized to the task bar.... *If I take the mouse and click on the executing main program to bring focus to it, I can press ESC and exit.... *I need the focus back on the main program as soon as the webservice is minimized to the taskbar..... ***************** IF INKEY() = 27 && ESC pressed Thisform.p_exitloop = .T. Thisform.pgfFSN.pageFSN.edtStatus.Value = "USER PRESSED ESCAPE TO CANCEL FREQUENT SHOPPER" EXIT ENDIF ENDDO IF NOT lbFileExists AND NOT Thisform.p_exitloop MESSAGEBOX("Frequent Shopper System is temporarily down." + CHR(13) + ; CHR(13) + "Please try again in a few moments.",0+16+0,"Frequent Shopper Problem") RETURN ELSE IF NOT lbFileExists AND Thisform.p_exitloop && We ESCAPED out RETURN ENDIF ENDIF Thisform.pgfFSN.pageFSN.edtStatus.Value = " "Any ideas?