Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to PrintScreen A Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
01045238
Message ID:
01045257
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform