📄 printfrm.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form PrintFrm
AutoRedraw = -1 'True
Caption = "Form1"
ClientHeight = 5850
ClientLeft = 4950
ClientTop = 2415
ClientWidth = 7440
Icon = "PrintFrm.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
ScaleHeight = 5850
ScaleWidth = 7440
WindowState = 2 'Maximized
Begin MSComDlg.CommonDialog PrintDialog
Left = 5280
Top = 360
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton PrintCom
Caption = "0"
Height = 255
Index = 4
Left = 4440
TabIndex = 7
Top = 2880
Width = 255
End
Begin VB.CommandButton PrintCom
Caption = "关 闭"
Height = 375
Index = 0
Left = 3840
TabIndex = 6
Top = 3480
Width = 855
End
Begin VB.HScrollBar SetPageLeft
Height = 255
Left = 0
TabIndex = 5
Top = 2880
Width = 4455
End
Begin VB.VScrollBar SetPageTop
Height = 2895
Left = 4440
TabIndex = 4
Top = 0
Width = 255
End
Begin VB.PictureBox PrintWin
BackColor = &H80000008&
Height = 2895
Left = 120
ScaleHeight = 2835
ScaleWidth = 4275
TabIndex = 3
Top = 0
Width = 4335
Begin VB.PictureBox PrintPage
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 2175
Left = 960
ScaleHeight = 2175
ScaleWidth = 3255
TabIndex = 9
Top = 960
Visible = 0 'False
Width = 3255
End
Begin VB.PictureBox ViewPage
AutoRedraw = -1 'True
BackColor = &H80000009&
BorderStyle = 0 'None
Height = 1695
Left = 480
ScaleHeight = 1695
ScaleWidth = 2655
TabIndex = 8
Top = 120
Width = 2655
End
End
Begin VB.CommandButton PrintCom
Caption = "打 印"
Height = 375
Index = 1
Left = 3000
TabIndex = 2
Top = 3480
Width = 855
End
Begin VB.CommandButton PrintCom
Caption = "下一页"
Height = 375
Index = 2
Left = 2160
TabIndex = 1
Top = 3480
Width = 855
End
Begin VB.CommandButton PrintCom
Caption = "上一页"
Height = 375
Index = 3
Left = 1320
TabIndex = 0
Top = 3480
Width = 855
End
Begin VB.Menu MenuPrintMain
Caption = "打印菜单"
Visible = 0 'False
Begin VB.Menu MenuPrintData
Caption = "选择数据"
Begin VB.Menu MenuDataRecor
Caption = "班级授课表"
Index = 0
End
Begin VB.Menu MenuDataRecor
Caption = "教师授课表"
Index = 1
End
Begin VB.Menu MenuDataRecor
Caption = "课堂考勤表"
Index = 2
End
Begin VB.Menu MenuDataRecor
Caption = "教师到班表"
Index = 3
End
Begin VB.Menu MenuDataRecor
Caption = "资源课表"
Index = 4
End
Begin VB.Menu MenuDataRecor
Caption = "-"
Index = 5
End
Begin VB.Menu MenuDataRecor
Caption = "课程汇总表"
Index = 6
End
Begin VB.Menu MenuDataRecor
Caption = "考勤汇总表"
Index = 7
End
End
Begin VB.Menu MenuPageSet
Caption = "页面设置..."
End
Begin VB.Menu MenuPrintOut
Caption = "打印"
End
Begin VB.Menu MenuLine2
Caption = "-"
End
Begin VB.Menu MenuPrintClose
Caption = "关闭窗口"
End
End
End
Attribute VB_Name = "PrintFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim PageIndex As Long '显示页索引.
Dim DataMode As Long '课表类型.0——班级授课表;1——教师授课表;2——班级考勤表;3——教师到班表。
Dim DataIndex As Long '课表索引。
Dim RoomNum As Long '预览缩放系数.
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Sub OutGather(Optional ByVal PrintMode As Boolean = False) '打印汇总表。
On Error Resume Next
Dim RowHeight As Double '行高。
Dim ColWidth As Double '列宽。
Dim ForIndex As Long
Dim TemNum As Double
Dim TemStr As String
Dim OneTableRowCount As Double '一个表格所占的高度。
Dim TableX As Long '横向表格索引。
Dim TableY As Long '纵向表格索引。
Dim RowIndex As Long
Dim ColIndex As Long
Dim DispNum As Long
Dim TemPage As Object
If PrintMode = True Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -