老师好!下面的代码在遍历朗读[单词]列时,光标同时定位到该行。但是实际上是光标直接定位到了最后一行,朗读依然是一行一行的。这是哪里的问题?
谢谢!
...
Speaker.Speak("", DotNetSpeech.SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak) '停止之前的朗读
Dim yy As WinForm.ComboBox = Forms("数据表").Controls("语音库")
Speaker.Rate = dr("默认语速") '设置语速
For idx As Integer = 0 To Tables("数据表_table1").Rows.Count - 1
Dim vl As String = Tables("数据表_table1").Rows(idx)("单词") '获得要朗读的文本
Speaker.Voice = Speaker.GetVoices(String.Empty,String.Empty).Item(yy.SelectedIndex)
Speaker.Speak(vl, DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync) '异步朗读
Tables("数据表_table1").Position = idx
Application.DoEvents '代码即刻生效
Next