📄 frmdocument.frm
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmDocument
Caption = "frmDocument"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 6405
Icon = "frmDocument.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 3195
ScaleWidth = 6405
WindowState = 2 'Maximized
Begin VB.CommandButton Command1
Caption = "停止朗读"
Height = 375
Index = 2
Left = 7680
TabIndex = 3
Top = 0
Width = 3615
End
Begin VB.CommandButton Command1
Caption = "清空"
Height = 375
Index = 1
Left = 4080
TabIndex = 2
Top = 0
Width = 3615
End
Begin VB.CommandButton Command1
Caption = "朗读"
Height = 375
Index = 0
Left = 480
TabIndex = 1
Top = 0
Width = 3615
End
Begin RichTextLib.RichTextBox rtfText
Height = 1995
Left = 240
TabIndex = 0
Top = 360
Width = 3000
_ExtentX = 5292
_ExtentY = 3519
_Version = 393217
ScrollBars = 3
TextRTF = $"frmDocument.frx":1272
End
End
Attribute VB_Name = "frmDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim vText As New VTxtAuto.VTxtAuto
Dim n As Long
Private Sub Command1_Click(Index As Integer)
On Error Resume Next
Select Case Index
Case 0
If Trim(rtfText.Text) = "" Then Exit Sub
Set vText = Nothing
vText.Register vbNullString, "Speech" & Str(n)
vText.Speak rtfText.Text, vtxtsp_NORMAL Or vtxtst_QUESTION
n = n + 1
Case 1
rtfText.Text = ""
Case 2
Set vText = Nothing
End Select
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set vText = Nothing
End Sub
Private Sub Form_Load()
Form_Resize
End Sub
Private Sub CommandExit_Click()
End
End Sub
Private Sub Form_Resize()
On Error Resume Next
rtfText.Move 100, 400, Me.ScaleWidth - 200, Me.ScaleHeight - 400
rtfText.RightMargin = rtfText.Width - 400
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -