Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printscreen Routine
Message
 
À
01/12/1997 11:54:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00062450
Message ID:
00064478
Vues:
50
No problem. Sorry, I know this is way out of date but I was out of town last week. It is a pretty nifty routine. I would never have come up with this either. Let me know if I can do anything else.

>Thanks for your help George, I never would have thought to do something like this (or known how)! This would seem to be faster than using OLE to run Word to print the clipboard. I'm going to play with this a bit, but I suspect I may end up using a combination of 'your' code and Vladimir Shevchenko's Sysinfo class.
>Dave
>
>>Dave,
>>Here is what I have. I don't know who originally came up with this but I can't take credit...it does work for me though.
>>
>>I have listed below a program I call printscr.prg. I have this as a procedure file in one of my apps. I then have a right click short-cut menu that the user can choose print screen from that calls this program. The only requirement is that the MS 'Edit' menu must be available and active for this to work. Hope this helps.
>>
>>** Printscr.prg -- Print screen routine.
>>LOCAL cAlias, tabused
>>IF USED(ALIAS())
>> cAlias=ALIAS()
>> tabused=.T.
>>ELSE
>> tabused=.F.
>>ENDIF
>>
>>** Declare Win32API Command:
>>DECLARE INTEGER keybd_event IN Win32API;
>> INTEGER, INTEGER, INTEGER, INTEGER
>>
>>** Execute and alt-printscreen to capture active window
>>keybd_event(44, 0, 0, 0)
>>
>>** On report from we print a bitmap from a field so create cursor
>>CREATE CURSOR screen_capture (SCREEN G)
>>APPEND BLANK
>>IF tabused
>> SELECT(cAlias)
>>ENDIF
>>
>>** Copy bitmap outside of visible work area
>>DEFINE WINDOW screen_capture FROM 200,200 TO 203,203
>>MODIFY GENERAL screen_capture.SCREEN NOWAIT WINDOW screen_capture
>>KEYBOARD "{CTRL+V}{CTRL+W}" CLEAR
>>
>>** Release temp window
>>RELEASE WIND screen_capture
>>
>>DOEVENTS
>>
>>IF !EMPTY(screen_capture.SCREEN)
>> SELECT screen_capture
>> REPORT FORM .\reports\printscr.frx TO PRINTER NOCONSOLE
>>ELSE
>> WAIT WINDOW 'Sorry, you cannot do a Print Screen of this form.'
>>ENDIF
>>USE IN screen_capture
>>IF tabused
>> SELECT(cAlias)
>>ENDIF
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform