>LPARAMETERS tnHWnd, tcJobName >LOCAL lcJobName >LOCAL lnRetVal > >DECLARE INTEGER PrintWindow IN DibApi32 ; > INTEGER HWnd, ; > INTEGER fPrintArea, ; > INTEGER fPrintOpt, ; > INTEGER wxScale, ; > INTEGER wyScale, ; > STRING @ szJobName > >#DEFINE PW_WINDOW 1 >#DEFINE PW_CLIENT 2 >#DEFINE PW_BESTFIT 1 >#DEFINE PW_STRETCHTOPAGE 2 >#DEFINE PW_SCALE 3 > >lcJobName = tcJobName + CHR(0) >lnRetVal = PrintWindow( tnHWnd, PW_WINDOW, PW_STRETCHTOPAGE, 0, 0, @lcJobName) >IF lnRetVal != 0 > IF lnRetVal != 6 && 6 = User canceled printing > = MESSAGEBOX("Unable to print the window" + CRLF + ; > "PrintWindow API call returned " + STR(lnRetVal), ; > MB_ICONEXCLAMATION + MB_OK, ; > oApp.cApplicationName) > ENDIF >ENDIF >RETURN > >I have used this solution and it works pretty good. My question is there anyway that it would only print the active window in the FoxPro screen?