Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image of form
Message
From
03/02/2008 15:14:17
 
 
To
03/02/2008 12:44:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01288760
Message ID:
01288832
Views:
13
>Hi,
>
>What would be the best way to get an image of a form, just the contents, not the borders or caption bar? Image can be any graphics format, preferably as a memory variable, but a file will do since I will just read it back into a variable.
>
>Jos

This is my Screenshot.prg, I hope you will find it hepful
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
Reply
Map
View

Click here to load this message in the networking platform