Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to change printer setting in program ?
Message
 
À
21/12/1997 20:06:42
Arnold Lee
K&A International Co.,Ltd
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00067494
Message ID:
00068133
Vues:
22
Unfortunately, there's no way to change it in the program that I know of. It has to be set in Windows 95. I had a form which had to be done on a printer which was capable of a certain, user-defined page width and length. The forms they had to print were called CAS forms. I had them set up a special printer with a default, user-defined form size. You can probably do this automatically with some API calls, but I'm not familiar so I put it in the documentation to add a special printer with CAS as the first three letters in the name. This is the code:

APRINTERS(aPrintall)
mCasPrtr=ASCAN(aPrintall, [CAS])
IF mCasPrtr =0
mMsgText=[Before running this procedure, you must set up a CAS Printer. ] && This line has a longer explanation in my actual code, but I won't bore you with details.

mMsgTitle ="Action!"
mAnswer =MESSAGEBOX(mMsgText, 0, mMsgTitle)
RETURN
ENDIF
mPrintName=aPrintall(mCasPrtr)
SET PRINTER TO NAME (mPrintName)

REPORT FORM Cas_shrt TO PRINTER PROMPT NOCONSOLE && I added the prompt in case they wanted to change it to another printer, but it's not necessary for this example.

Hope this helps!

JR

>I have a report with printer setting with scale = 50,when I switch to another printer,the setting lose.How can I made it change in program ?
>
>Thanks for any comment in advance.
>
>Arnold
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform