监控录像机硬盘价格:vb小问题高手来指点下

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/27 21:35:44
(复制下面的代码运行可以朗读但是按钮没有办法再按,只能关闭程序从新运行才可以。有没有办法让此程序不用从新运行就可以点按钮让其反复读音?《Command1.Enabled = true时就出问题》 )
Dim vText As New VTxtAuto.VTxtAuto

Private Sub Command1_Click()
Dim astr As String

Command1.Enabled = False
vText.Register vbNullString, "Speech"
'vtext.Register
astr = "This is a sample of Microsoft Speech Engine?"
vText.Speak astr, vtxtsp_NORMAL Or vtxtst_QUESTION
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set vText = Nothing
End Sub