>Hello. I'm currently making some enhancements to my foxpro 6 application that I developed. The users want to be able to print a screen within the application. Is there anyway to automate this process. I found a code snippet on Microsoft's website that will automate printscreen and paste the screenshot in a word document. However, the printscreen is screenshot of the entire application including the users desktop. Is there anyway to get a printscreen of only the form? Any help will be greatly appreciated.
>
>Brad
In addition try this:
DECLARE INTEGER GetDesktopWindow IN Win32api
DECLARE INTEGER PrintWindow IN DibApi32 ;
INTEGER HWnd, ;
INTEGER fPrintArea, ;
INTEGER fPrintOpt, ;
INTEGER wxScale, ;
INTEGER wyScale, ;
STRING @ szJobName
LOCAL nRetVal,cJobName
cJobName = 'Print Screen'
nRetVal = PrintWindow(GetDesktopWindow(),1,1,0,0,@cJobName)
IF nRetVal != 0
IF nRetVal != 6
MESSAGEBOX("Unable to print the window" + chr(10) + ;
"See System Administrator " + STR(nRetVal),48, ;
"FUBA Print Screen ")
ENDIF
ENDIF
You need DibApi32.Dll in your path. Search for this .dll in web
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst