读书人

PB12.1中的printOpen函数回来-1

发布时间: 2012-12-30 10:43:15 作者: rapoo

PB12.1中的printOpen函数返回-1
用word测试打印机是可以打印的,直接用数据窗口dw_1.Print()也 是可以打印。就是用PrintOpen函数会返回-1,这是什么原因造成的?
[解决办法]
Returns the job number if it succeeds and -1 if an error occurs.
If any argument's value is null, PrintOpen returns null.
[解决办法]
试一下:


Integer Code
Code=printSetup()
If code=1 then
long job
job = PrintOpen()
PrintDataWindow(job,dw_regcode)
PrintClose(job)
end if

读书人网 >PB

热点推荐