注册 登录
编程论坛 VB6论坛

英文朗读程序遇到问题

tgling 发布于 2021-04-11 18:40, 1182 次点击
vb6.0运行提示“错-2147219692(80040714) 'register'方法‘ivtxtauto’失败,请大家帮忙!
 Dim vText As New VTxtAuto.VTxtAuto
Private Sub Command5_Click()
Load Form21
Form21.Show
Unload Me
End Sub
Private Sub cmdPause_Click()
        If vText.IsSpeaking Then
            cmdStop.Enabled = True
            cmdResume.Enabled = True
            vText.AudioPause
        End If
End Sub

Private Sub cmdResume_Click()

      vText.AudioResume

End Sub

Private Sub cmdSpeek_Click()
    Dim astr As String
    vText.Register vbNullString, "Speech"
    'vtext.Register
    astr = Text1.Text
    vText.Speak astr, vtxtsp_NORMAL Or vtxtst_QUESTION
    cmdSpeak.Enabled = False
    cmdStop.Enabled = True
    cmdPause.Enabled = True
    cmdResume.Enabled = False
    vText.Speak Text1, vtxtst_READING
End Sub

Private Sub cmdStop_Click()
        If vText.IsSpeaking Then
            cmdSpeak.Enabled = True
            cmdStop.Enabled = False
            vText.StopSpeaking
        End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set vText = Nothing
End Sub
0 回复
1