Can i get screenshot ?

Cringer

ProgressTalk.com Moderator
Staff member
I've never heard of a way of doing that unless you can use some sort of OCX to do it. I doubt you can do it with plain Progress though. What are you trying to achieve?
 

Osborne

Active Member
The only way I know of getting a screenshot of the current window is to hold down the "Alt" key then press the "Print Screen/SysRq" key which copies it to the clipboard. If you can use Windows API's you can mimic this in Progress:
Code:
DEFINE VARIABLE intResult AS INTEGER NO-UNDO.

ON CHOOSE OF bScreenshot DO:
   RUN keybd_event (44, 1, 0, 0, OUTPUT intResult).
END.

PROCEDURE keybd_event EXTERNAL "USER32.DLL":
   DEFINE INPUT PARAMETER bVk AS SHORT NO-UNDO.
   DEFINE INPUT PARAMETER bScan AS SHORT NO-UNDO.
   DEFINE INPUT PARAMETER dwFlags AS LONG  NO-UNDO.
   DEFINE INPUT PARAMETER dwExtraInfo AS LONG NO-UNDO.
   DEFINE RETURN PARAMETER intResult AS LONG NO-UNDO.
END PROCEDURE.
As Cringer asks, what are you trying to achieve? Does the screenshot being on the clipboard solve the problem?
 
Top