Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print to network printer
Message
De
24/12/2019 03:25:55
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
01672434
Message ID:
01672436
Vues:
48
Great advice, I completely forgot about this, thank you!!

>I assume you are printing VFP report, right? Make sure that printer info is not saved with report

>Hi all, I need to print to a network printer and I try to change the default printer to a new of the shared printers using the normal set printer to name "printer" but it never works, even putting that printer as default on windows, what am I doing wrong? TIA...
>
>p1=SET("Printer",2)
>SET PRINTER TO NAME (p1) && or any other name
>***trying to force
>DECLARE Long GetLastError IN WIN32API
>DECLARE Long SetDefaultPrinter In WINSPOOL.DRV String pPrinterName
>IF SetDefaultPrinter(p1) = 0
>* Error
> MESSAGEBOX(WinApiErrMsg(GetLastError()),16,"Error")
>ENDIF
>
>it prints well but always to another printer not the selected.
John Harold Belalcázar Lozano
Associate Director Of Development
http://www.belvicto.co/
jhbelalc@gmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform