Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen Dump to Disk File
Message
From
03/11/2005 02:45:29
 
 
To
03/11/2005 00:19:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01064835
Message ID:
01064848
Views:
24
>Hi All
>
>What is the simplst way to dump the entire Windows screen to a bmp, or png/gif/whatever, image file using VFP9?
>
>Thanks

Hi Jos,

Not exactly what you are looking for, but this routine copies the current open window to the clipboard.

I also strongly recommend the free GPImage2 utility which you can download at http://cchalom.sites.uol.com.br/GPIMAGE/index.htm. If you modify my routine and/or use a function or two from GPInage, you should be able to get the result you want.
DECLARE INTEGER keybd_event IN Win32API ;
        INTEGER, INTEGER, INTEGER, INTEGER
*
* Do an Alt-Printscreen
*
#DEFINE VK_LMENU 164
#DEFINE VK_SNAPSHOT 44
#DEFINE KEYEVENTF_EXTENDEDKEY 1
#DEFINE KEYEVENTF_KEYUP 2
DOEVENTS
keybd_event( VK_LMENU,    0, KEYEVENTF_EXTENDEDKEY, 0 )  && key down
INKEY(0.01)
keybd_event( VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0 )
INKEY(0.01)
keybd_event( VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
INKEY(0.01)
keybd_event( VK_LMENU,    0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
DOEVENTS
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform