Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 'alias oprndev not found' from rawprint program
Message
 
 
À
18/07/2002 10:27:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00679915
Message ID:
00679979
Vues:
18
There's an error in the sample code. It should be
MessageBox("OpenPrinter() Error: "+str(vprdev.nOpenError))
>The error actually happens from the rawprint program that I downloaded from the Universal Thread. Here is the code from that program. This is right out of the sample program that came with the rawprint class.
>
>Param cfiletoprt, cprinter
>
>If pcount()<2
> ? 'Do prtfile with "File to print", "printer name"'
> ?
> ? 'Eg. Do PrtFile with "TestPrint.prn", "Generic / Text Only"'
> ?
> return
>Endif
>
>Set Classlib To rawprint
>vprdev=CreateObject("PrintDev")
>
>vprdev.cprintername = cprinter
>vprdev.cfilename = cfiletoprt
>If vprdev.oOpen()
> if !vprdev.oPrintFile()
> MessageBox("Error sending to printer")
> endif
> vprdev.oClose()
>Else
> MessageBox("OpenPrinter() Error: "+str(oPrnDev.nOpenError))
>Endif
>
>Release vprdev
>Set Classlib to
>
>Return
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform