打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
vfp9终结一直以来的打印纸张设置

文章来源:互联网

*********************************************************
* vfp9终结一直以来关于打印纸张设置

* 过程名称:MyReport.prg

* 调用方式:MyReport(ReportName, Height, Width)
* 当 Height和Width为空时,默认A4纸

* 程序原创:dupeiji

* 最后修改:pnyjq

* 修改日期:2005-03-23

* 待解决问题:当ListenerType = 1时无法正常预览
*********************************************************
Parameters lcFRX, nHeight, nWidth

Local loReportListener

If Empty(lcFRX)
Return
Endif

loReportListener = Createobject("Test")

#DEFINE A4_Height 29.7
#DEFINE A4_Width 21

loReportListener.sHeight=Icase(Empty(nHeight), A4_Height, nHeight)
loReportListener.sWidth=Icase(Empty(nWidth), A4_Width, nWidth)

Report Form (lcFRX) Object loReportListener

Define Class Test As ReportListener
ListenerType = 0
sHeight=0
Procedure GetPageHeight()
If This.sHeight >0
Return This.sHeight * 377.95
Else
Return DoDefault()
Endif
Endproc

sWidth=0
Procedure GetPageWidth()
If This.sWidth >0
Return This.sWidth * 377.95
Else
Return DoDefault()
Endif
Endproc

Procedure OutputPage(nPageNo, eDevice, nDeviceType, nleft, nTop, nWidth, nHeight)
t_sHeight=This.sHeight
This.sHeight=0
nHeight=t_sHeight * 377.95 * nHeight/This.GetPageHeight()
This.sHeight=t_sHeight

t_sWidth=This.sWidth
This.sWidth=0
nWidth=t_sWidth * 377.95 * nWidth/This.GetPageWidth()
This.sWidth=t_sWidth

DoDefault(nPageNo, eDevice, nDeviceType,nleft, nTop, nWidth, nHeight)
Nodefault
Endproc
Enddefine

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
网站性能优化:动态缩略图技术实现思路
程序窗体及控件自适应分辨率
书写函数规范
linux 平台camera失去YUV数据转RGB888及加BMP头文件
视频等比例显示和拉伸显示 ,视频中框的等比显示
GDI/GDI+这些破事
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服