Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to PrintScreen A Form
Message
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
01045238
Message ID:
01045257
Views:
24
>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 && title you want to show when printing

    cJobName = 'Print Screen' && could be passed as a parameter, also.

    nRetVal = PrintWindow(GetDesktopWindow(),1,1,0,0,@cJobName)
    IF nRetVal != 0
        IF nRetVal != 6 && 6 = User canceled printing
            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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform