:progame 的报表解决之道------------->> DllPrint (大家有兴趣的话,去看一下,提供源代码) 主页地址:http://progame.longcity.net/

Richard2001 2001-12-04 11:37:36
我新增了支持横向预览和打印功能:
1.ModFun中增加一行:
  '--2001/12/04
  Public OrientationPRORLandscape As Boolean 'True-横向打印 False-纵向打印
  '------------

2.frmPreview的工具条上增加一个ComboBox,命名为LstPage.其List属性中增加条目:
纵向
横向
Private Form_Load() 中增加一句:
lstPage.ListIndex = 0 '纵向


Private Sub lstPage_Click()
'--2001/12/04

Dim d As Double, x As Double, y As Double
'x = picPaper.left: y = picPaper.top

If lstPage.ListIndex = 1 Then
OrientationPRORLandscape = True
d = picPaper.height
picPaper.height = picPaper.Width
picPaper.Width = d

Printer.Orientation = vbPRORLandscape '横向打印
Else
OrientationPRORLandscape = False
d = picPaper.height
picPaper.height = picPaper.Width
picPaper.Width = d

Printer.Orientation = vbPRORPortrait '纵向打印
End If
CalPage
out page, cutpage
End Sub

3.frmPrint中的cmdBegin_Click前增加:
Private Sub cmdBegin_Click()
'--2001/12/04
If OrientationPRORLandscape = True Then
Printer.Orientation = vbPRORLandscape '横向打印
Else
Printer.Orientation = vbPRORPortrait '纵向打印
End If
'------------
  
...
...全文
46 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

807

社区成员

发帖
与我相关
我的任务
社区描述
VB 多媒体
社区管理员
  • 多媒体
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧