📄 form1.frm
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form Form1
Caption = "RichTextBox控件打印"
ClientHeight = 4755
ClientLeft = 60
ClientTop = 345
ClientWidth = 6660
LinkTopic = "Form1"
ScaleHeight = 4755
ScaleWidth = 6660
StartUpPosition = 3 '窗口缺省
Begin RichTextLib.RichTextBox RichTextBox1
Height = 3735
Left = 120
TabIndex = 1
Top = 720
Width = 6495
_ExtentX = 11456
_ExtentY = 6588
_Version = 393217
Enabled = -1 'True
TextRTF = $"Form1.frx":0000
End
Begin VB.CommandButton Command1
Caption = "&Print"
Height = 495
Left = 120
TabIndex = 0
Top = 120
Width = 975
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
' 1440 Twips = 1 Inch
PrintRTF RichTextBox1, 1440, 1440, 1440, 1440
End Sub
Private Sub Form_Load()
Dim LineWidth As Long
Command1.Move 10, 10, 600, 380
RichTextBox1.SelFontName = "宋体"
RichTextBox1.SelFontSize = 14
LineWidth = WYSIWYG_RTF(RichTextBox1, 1440, 1440)
Me.Width = LineWidth + 200
RichTextBox1.Text = "照猫画虎http://zmhh.mycool.net"
End Sub
Private Sub Form_Resize()
RichTextBox1.Move 100, 500, Me.ScaleWidth - 200, Me.ScaleHeight - 600
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -