📄 frmprinter.frm
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmPrinter
Caption = "打印报表"
ClientHeight = 5370
ClientLeft = 60
ClientTop = 345
ClientWidth = 6510
Icon = "frmPrinter.frx":0000
LinkTopic = "Form1"
ScaleHeight = 5370
ScaleWidth = 6510
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 375
Left = 1800
TabIndex = 1
Top = 120
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "打印"
Height = 375
Left = 120
TabIndex = 0
Top = 120
Width = 1215
End
Begin RichTextLib.RichTextBox RTBox
Height = 4335
Left = 0
TabIndex = 2
Top = 720
Width = 5895
_ExtentX = 10398
_ExtentY = 7646
_Version = 393217
ReadOnly = -1 'True
ScrollBars = 3
RightMargin = 14000
TextRTF = $"frmPrinter.frx":0442
End
End
Attribute VB_Name = "frmPrinter"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
RTBox.SelStart = 0
RTBox.SelLength = 0
RTBox.SelPrint Printer.hdc
If Err <> 0 Then MsgBox "发现错误:" & Error$, vbCritical, "错误"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
RTBox.RightMargin = 210 * 56.6667 - 1300
End Sub
Private Sub Form_Resize()
On Error Resume Next
RTBox.Height = Me.Height - RTBox.Top - 400
RTBox.Width = Me.Width - RTBox.Left - 120
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -