⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formatsetclass.cls

📁 金算盘软件代码
💻 CLS
📖 第 1 页 / 共 3 页
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ClsFormatSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'功能:为帐册,报表提供有关打印,格式属性和方法
'作者:李鹏
'日期:1998年8月
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Option Explicit
Private mintReportType As Integer              '报表类型
Private mlngReportID As Long                   '报表ID
Private mlngPrintSetupID As Long               '打印设置ID
Private mlngSeriesPrintID As Long              '套打ID

Private mintZoomScale As Integer               '缩放比例
Private mintPageZoom As Integer                '页面缩放选择
Private mbytPageSetup As Byte                  '页面设置类型   0-自动设置
Private mlngHeightPerRow As Double             '每行行高(在类模块中,暂存毫米)
Private mintRowsPerPage As Integer             '每页行数
Private mblnNeedSeprateLine As Boolean         '是否需要行分隔线
Private mintLineSpace As Integer               '每隔多少行加一分隔线
Private mblnFooterAlign As Boolean             '是否页末空行对齐

Private mblnShowMoneyLine As Boolean           '是否显示金额线
Private mblnShowNotZero As Boolean             '是否只显示非零值
Private mblnShowSeprate As Boolean             '是否显示分隔符
Private mintFormatNegative As Integer          '格式负数类型

Private mintPaperIndex As Integer              '纸张类型索引
Private mlngPaperWidth As Long                 '纸宽
Private mlngPaperHeight As Long                '纸高
Private mblnPortrait As Boolean                '是否纵向打印

Private mlngPaperBorder(0 To 6) As Long        '定义纸边界
Private mintBindPosition As Integer            '装订位置
Private mblnHoriCentre As Boolean              '是否水平居中
Private mblnVertCenter As Boolean              '是否垂直居中

Private mstrHeader(0 To 2) As String           '页眉
Private mstrFooter(0 To 2) As String           '页脚
Private mlngBorderColor(0 To 2) As Long        '边界颜色
Private mintBorderWidth(0 To 2) As Integer     '边界粗细
Private mintFrameStyle As Integer              '外边框样式
Private mintFrameLine As Integer               '外边框线型

Private mlngFontID(0 To 4) As Long             '字体ID
Private mfntPropertiy(0 To 4) As New StdFont   '字体属性  (0-标题,1-正文,2-页眉页脚,3-表头表尾,4-列标题(针对报表))
Private mlngFontColor(0 To 4) As Long          '字体颜色  (0-标题,1-正文,2-页眉页脚,3-表头表尾,4-列标题(针对报表))
Private mlngFontBKColor(0 To 4) As Long        '字体背景颜色

Private mblnSaveToDB As Boolean
Private mintPaperTypeIndex As Integer          '返回给外部报表的纸张尺寸
Private mintPaperTypeIndex1 As Integer
Private mblnPreSet As Boolean                  '是否预置打印设置ID


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'                              公共属性
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Property Get ReportType() As Integer
    ReportType = mintReportType
End Property

Public Property Get IsReport() As Boolean
    Select Case mintReportType
    Case 1, 2
        IsReport = False
    Case Else
        IsReport = True
    End Select
End Property
Public Property Get PrintSetupID() As Long
    PrintSetupID = mlngPrintSetupID
End Property

Public Property Get SeriesPrintID() As Long
    SeriesPrintID = mlngSeriesPrintID
End Property

''''''''''''''''''''''''''''''''''''''''''''''''''

Public Property Get GZoomScale() As Integer
    If mintZoomScale = 0 Then
        GZoomScale = 100
    Else
        GZoomScale = mintZoomScale
    End If
End Property
Public Property Let GZoomScale(ByVal vData As Integer)
    mintZoomScale = vData
End Property
Public Property Get GPageZoom() As Integer
    GPageZoom = mintPageZoom
End Property
Public Property Let GPageZoom(ByVal vData As Integer)
    mintPageZoom = vData
End Property
Public Property Get GPageSetup() As Byte
    GPageSetup = mbytPageSetup
''  GPageSetup = 0   '强制每次设置成自动页面设置方式
End Property
Public Property Let GPageSetup(ByVal vData As Byte)
    mbytPageSetup = vData
End Property
Public Property Get GHeightPerRow() As Double
'把毫米转换成像素
    GHeightPerRow = mlngHeightPerRow * 56.7 / Screen.TwipsPerPixelY
End Property
Public Property Get GHBHeightPerRow() As Double
'把毫米转换成像素
    GHBHeightPerRow = mlngHeightPerRow * 56.7 * 500 / Screen.TwipsPerPixelY
End Property
Public Property Let GHeightPerRow(ByVal vData As Double)
    mlngHeightPerRow = vData
End Property
Public Property Get GHeighPerRowMM() As Double
'直接返回毫米
    GHeighPerRowMM = mlngHeightPerRow
End Property
Public Property Get GRowsPerPage() As Integer
    GRowsPerPage = mintRowsPerPage
End Property
Public Property Let GRowsPerPage(ByVal vData As Integer)
    mintRowsPerPage = vData
End Property
Public Property Get GIsNeedSeprateLine() As Boolean
    GIsNeedSeprateLine = mblnNeedSeprateLine
End Property
Public Property Let GIsNeedSeprateLine(ByVal vData As Boolean)
    mblnNeedSeprateLine = vData
End Property
Public Property Get GLineSpace() As Integer
    GLineSpace = mintLineSpace
End Property
Public Property Let GLineSpace(ByVal vData As Integer)
    mintLineSpace = vData
End Property
Public Property Get GIsPageFooterAlign() As Boolean
    GIsPageFooterAlign = mblnFooterAlign
End Property
Public Property Let GIsPageFooterAlign(ByVal vData As Boolean)
    mblnFooterAlign = vData
End Property

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Property Get GIsShowMoneyLine() As Boolean
    GIsShowMoneyLine = mblnShowMoneyLine
End Property
Public Property Let GIsShowMoneyLine(ByVal vData As Boolean)
    mblnShowMoneyLine = vData
End Property
Public Property Get GIsShowNotZero() As Boolean
    GIsShowNotZero = mblnShowNotZero
End Property
Public Property Let GIsShowNotZero(ByVal vData As Boolean)
    mblnShowNotZero = vData
End Property
Public Property Get GIsShowSeprate() As Boolean
    GIsShowSeprate = mblnShowSeprate
End Property
Public Property Let GIsShowSeprate(ByVal vData As Boolean)
    mblnShowSeprate = vData
End Property
Public Property Get GFormatNegative() As Integer
    GFormatNegative = mintFormatNegative
End Property
Public Property Let GFormatNegative(ByVal vData As Integer)
    mintFormatNegative = vData
End Property

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Property Get GPaperIndex() As Integer
    GPaperIndex = mintPaperIndex
End Property
Public Property Let GPaperIndex(ByVal vData As Integer)
    mintPaperIndex = vData
End Property
Public Property Get GPaperWidth() As Long
'把0.1毫米转换为像素
    GPaperWidth = mlngPaperWidth
End Property
Public Property Let GPaperWidth(ByVal vData As Long)
    mlngPaperWidth = vData
End Property
Public Property Get GPaperHeight() As Long

    GPaperHeight = mlngPaperHeight
End Property
Public Property Let GPaperHeight(ByVal vData As Long)
    mlngPaperHeight = vData
End Property
Public Property Get GIsPortrait() As Boolean
    GIsPortrait = mblnPortrait
End Property
Public Property Let GIsPortrait(ByVal vData As Boolean)
    mblnPortrait = vData
End Property

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'把0.1毫米转换为像素
Public Property Get GPaperBorder(ByVal i As Integer) As Long
    GPaperBorder = mlngPaperBorder(i) * 56.7 / Screen.TwipsPerPixelY
End Property

Public Property Get GHMPaperBorder(ByVal i As Integer) As Long
    GHMPaperBorder = mlngPaperBorder(i)
End Property

Public Property Let GPaperBorder(ByVal i As Integer, ByVal vData As Long)
    mlngPaperBorder(i) = vData
End Property
Public Property Let GHMPaperBorder(ByVal i As Integer, ByVal vData As Long)
    mlngPaperBorder(i) = vData
End Property

Public Property Get GBindPosition() As Integer
    GBindPosition = mintBindPosition
End Property
Public Property Let GBindPosition(ByVal vData As Integer)
    mintBindPosition = vData
End Property
Public Property Get GIsHoriCentre() As Boolean
    GIsHoriCentre = mblnHoriCentre
End Property
Public Property Let GIsHoriCentre(ByVal vData As Boolean)
    mblnHoriCentre = vData
End Property
Public Property Get GIsVertCenter() As Boolean
    GIsVertCenter = mblnVertCenter
End Property
Public Property Let GIsVertCenter(ByVal vData As Boolean)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -