preview3.frm
来自「这个是我以前做的一个客户管理系统.包内已经含有源码和所用到的控件.代码是用VB写」· FRM 代码 · 共 1,949 行 · 第 1/5 页
FRM
1,949 行
VERSION 5.00
Object = "{7E00A3A2-8F5C-11D2-BAA4-04F205C10000}#1.0#0"; "VSVIEW6.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmPreview
Caption = "打印预览"
ClientHeight = 5340
ClientLeft = 1215
ClientTop = 1995
ClientWidth = 9480
Icon = "Preview3.frx":0000
LinkTopic = "Form1"
MinButton = 0 'False
ScaleHeight = 5340
ScaleWidth = 9480
Begin VSVIEW6Ctl.VSPrinter VsPreview
Height = 4215
Left = 480
TabIndex = 7
Top = 720
Width = 6735
_cx = 4206184
_cy = 4201739
Appearance = 1
BorderStyle = 1
Enabled = -1 'True
MousePointer = 0
BackColor = -2147483643
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 11.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty HdrFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Courier New"
Size = 14.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_ConvInfo = -1
AutoRTF = -1 'True
Preview = -1 'True
DefaultDevice = 0 'False
PhysicalPage = -1 'True
AbortWindow = -1 'True
AbortWindowPos = 0
AbortCaption = "Printing..."
AbortTextButton = "Cancel"
AbortTextDevice = "on the %s on %s"
AbortTextPage = "Now printing Page %d of"
FileName = ""
MarginLeft = 1440
MarginTop = 1440
MarginRight = 1440
MarginBottom = 1440
MarginHeader = 0
MarginFooter = 0
IndentLeft = 0
IndentRight = 0
IndentFirst = 0
IndentTab = 720
SpaceBefore = 0
SpaceAfter = 0
LineSpacing = 100
Columns = 1
ColumnSpacing = 180
ShowGuides = 2
LargeChangeHorz = 300
LargeChangeVert = 300
SmallChangeHorz = 30
SmallChangeVert = 30
Track = 0 'False
ProportionalBars= -1 'True
Zoom = 21.8165627782725
ZoomMode = 3
ZoomMax = 400
ZoomMin = 10
ZoomStep = 5
MouseZoom = 2
MouseScroll = -1 'True
MousePage = -1 'True
EmptyColor = -2147483636
TextColor = 0
HdrColor = 0
BrushColor = 0
BrushStyle = 0
PenColor = 0
PenStyle = 0
PenWidth = 0
PageBorder = 0
Header = ""
Footer = ""
TableSep = "|;"
TableBorder = 7
TablePen = 0
TablePenLR = 0
TablePenTB = 0
HTMLStyle = 1
End
Begin VB.Frame Frame1
Height = 645
Left = 30
TabIndex = 1
Top = -60
Width = 10185
Begin MSComctlLib.Toolbar Toolbar1
Height = 330
Left = 120
TabIndex = 2
Top = 180
Width = 9885
_ExtentX = 17436
_ExtentY = 582
ButtonWidth = 609
ButtonHeight = 582
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 29
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlSetPrint"
Object.ToolTipText = "设置打印参数"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlpage"
Object.ToolTipText = "设置页面参数"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlother"
Object.ToolTipText = "设置打印其它选项"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlZoomOut"
Object.ToolTipText = "放大"
ImageIndex = 4
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlZoomIn"
Object.ToolTipText = "缩小"
ImageIndex = 5
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlFirstPage"
Object.ToolTipText = "第一页"
ImageIndex = 6
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlPrevPage"
Object.ToolTipText = "上一页"
ImageIndex = 7
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlNextPage"
Object.ToolTipText = "下一页"
ImageIndex = 8
EndProperty
BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlLastPage"
Object.ToolTipText = "最后一页"
ImageIndex = 9
EndProperty
BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button22 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button23 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button24 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button25 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button26 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button27 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlHelp"
Object.ToolTipText = "帮助"
ImageIndex = 10
EndProperty
BeginProperty Button28 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button29 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tlExit"
Object.ToolTipText = "退出"
ImageIndex = 11
EndProperty
EndProperty
Begin VB.TextBox txtPages
Height = 270
Left = 2700
TabIndex = 6
Text = "1"
Top = 30
Width = 405
End
Begin VB.CommandButton cmdPrint
Caption = "打印(&P)"
Default = -1 'True
Height = 315
Left = 6330
TabIndex = 5
Top = 30
Width = 1125
End
Begin VB.CommandButton cmdClose
Caption = "关闭(&C)"
Height = 315
Left = 7590
TabIndex = 4
Top = 30
Width = 1125
End
Begin VB.ComboBox cboZoom
Height = 300
Left = 3870
TabIndex = 3
Text = "100"
Top = 30
Width = 1215
End
End
End
Begin VB.Timer Timer1
Interval = 100
Left = 1470
Top = 630
End
Begin MSComctlLib.StatusBar stb
Align = 2 'Align Bottom
Height = 285
Left = 0
TabIndex = 0
Top = 5055
Width = 9480
_ExtentX = 16722
_ExtentY = 503
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 11033
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Text = "页数:"
TextSave = "页数:"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Text = "时间"
TextSave = "时间"
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 5850
Top = 840
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 11
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":014A
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":02A6
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":06FA
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":0B4E
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":0E6A
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":1186
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":129A
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":13AE
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":14C2
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":15D6
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Preview3.frx":18F2
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmPreview"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mstrField As String
Private mstrContent As String
Private mbEndLine As Boolean
Private mbBeginLine As Boolean
Private mbFirst As Boolean
Private gClassName() As String
Private gColWidth(50) As Double '记录每列宽度,最多50列
Private gSubHead(50) As String '记录每列标题
Private gCols As Integer '记录总列数
Private gAlign(50) As String '记录每列的对齐格式
'Private mHeight As Double '行高
'Private mHeadHeight As Double '首行高度
Private mTop As Double '记录正在书写的高度
Private mIndex As Integer
Private mbSetNextColumn As Boolean '是否设置下页列标题
Private Sub mDrawRect(left As Double, Top As Double, Width As Double, Height As Double)
Dim Rect As String
Rect = left & Space(1) & Top & Space(1) & left + Width & Space(1) & Top & Space(1) & left + Width & Space(1) & Top + Height & Space(1) & left & Space(1) & Top + Height & Space(1) & left & Space(1) & Top
'' vspreview.Polygon = Rect
VsPreview.Polyline = Rect
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?