:progame 的报表解决之道------------->> DllPrint (大家有兴趣的话,去看一下,提供源代码) 主页地址:http://progame.longcity.net/
我新增了支持横向预览和打印功能:
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
'------------
...