Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print a form
Message
De
16/02/1999 13:11:10
 
 
À
16/02/1999 12:48:54
Allen Hanna
H. A. Hanna Associates
Indianola, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00188041
Message ID:
00188049
Vues:
22
>Can anyone give me some ideas about tricky ways to print a hardcopy of a form (VFP5/Win95)? I have a form and I'd like to programmatically print an image of the form. Or, do a print screen by clicking a VFP control. Or, is there a fast way to transfer the layout of the field text boxes into a report format? There are many times I would like to give the users the equivalent of a print screen button without having to go to the work of creating a report page that looks like the form.
>
>Thanks,
>Allen

1) Define a report called PRINTSCR.FRX with a general field in it

2) Have your button execute the following code:

LOCAL cArea
cArea = SELECT()
DECLARE INTEGER keybd_event IN Win32API ;
INTEGER, INTEGER, INTEGER, INTEGER
keybd_event(44,0,0,0)
CREATE CURSOR screen_capture (screen G)
APPEND BLANK
DEFINE WINDOW screen_capture FROM 100,100 TO 263,263
MODIFY GENERAL screen_capture.screen NOWAIT WINDOW screen_capture
KEYBOARD "{Ctrl+V}{Ctrl+W}" CLEAR
RELEASE WIND screen_capture
DOEVENTS
REPORT FORM ('printscr') TO PRINTER NOCONSOLE
USE IN screen_capture
SELECT (cArea)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform