?? txt2snd.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "朗讀日語的程序 (本程序由鐘嶸設計)"
ClientHeight = 7485
ClientLeft = 60
ClientTop = 345
ClientWidth = 5235
LinkTopic = "Form1"
ScaleHeight = 7485
ScaleWidth = 5235
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 1575
Left = 240
TabIndex = 5
Top = 5520
Width = 4695
End
Begin VB.CommandButton Command4
Caption = "退出"
Height = 975
Left = 3840
TabIndex = 4
Top = 4440
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "暫停"
Height = 975
Left = 2640
TabIndex = 3
Top = 4440
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "停止"
Height = 975
Left = 1440
TabIndex = 2
Top = 4440
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "朗讀"
Height = 975
Left = 240
TabIndex = 1
Top = 4440
Width = 1095
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4095
Left = 240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Text = "txt2snd.frx":0000
Top = 240
Width = 4695
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim z1 As Integer, Str1 As String
Private Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long
Private Sub Command1_Click()
On Error GoTo handler
Call VTxtAuto.VTxtAuto.Speak(Trim(Text1.Text), vtxtsp_VERYHIGH + vtxtst_READING)
Command2.Enabled = True
Command3.Enabled = True
Exit Sub
handler:
MsgBox "只能讀英文文檔", "錯誤提示"
End Sub
Private Sub Command2_Click()
Call VTxtAuto.VTxtAuto.StopSpeaking
Command2.Enabled = False
Command3.Enabled = False
End Sub
Private Sub Command3_Click()
If VTxtAuto.VTxtAuto.IsSpeaking Then
Call VTxtAuto.VTxtAuto.AudioPause
Command3.Caption = "恢復"
Else
Call VTxtAuto.AudioResume
Command3.Caption = "暫停"
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
i = waveOutGetNumDevs()
If i <= 0 Then
MsgBox "系統無聲卡或未裝聲卡驅動程序"
Unload Me
Else
Call VTxtAuto.VTxtAuto.Register(Space(10), Space(10))
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 32 Then
Str1 = Right(Text2, Len(Text2) - z1 - 1)
z1 = Len(Text2)
On Error GoTo handler
Call VTxtAuto.VTxtAuto.Speak(Trim(Str1), vtxtsp_VERYHIGH + vtxtst_READING)
Exit Sub
handler:
MsgBox "只能讀英文文檔", "錯誤提示"
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -