form1.frm
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "Richtx32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5715
ClientLeft = 60
ClientTop = 345
ClientWidth = 7800
LinkTopic = "Form1"
ScaleHeight = 5715
ScaleWidth = 7800
StartUpPosition = 3 '窗口缺省
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 345
Left = 210
TabIndex = 2
Top = 5235
Width = 5910
_ExtentX = 10425
_ExtentY = 609
_Version = 393216
Appearance = 1
End
Begin VB.CommandButton Command1
Caption = "VB语法高亮处理"
Height = 405
Left = 6285
TabIndex = 1
Top = 5175
Width = 1410
End
Begin RichTextLib.RichTextBox RichTextBox1
Height = 4980
Left = 165
TabIndex = 0
Top = 90
Width = 7560
_ExtentX = 13335
_ExtentY = 8784
_Version = 393217
ScrollBars = 3
AutoVerbMenu = -1 'True
TextRTF = $"Form1.frx":0000
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
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 WithEvents oSyntax As CSyntax
Attribute oSyntax.VB_VarHelpID = -1
Private Sub Command1_Click()
ProgressBar1.Value = 0
ProgressBar1.Max = 100
ProgressBar1.Min = 0
Set oSyntax = New CSyntax
oSyntax.HighLightRichEdit RichTextBox1
ProgressBar1.Value = ProgressBar1.Max
Set oSyntax = Nothing
MsgBox "处理完成。"
End Sub
Private Sub Form_Load()
RichTextBox1.RightMargin = RichTextBox1.Width * 2
RichTextBox1.LoadFile "test.txt", 1
End Sub
Private Sub oSyntax_Progress(ByVal Value As Integer)
ProgressBar1.Value = Value
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -