Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 'alias oprndev not found' from rawprint program
Message
 
 
To
18/07/2002 10:27:59
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00679915
Message ID:
00679979
Views:
19
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform