我 用 for next 语句 进行 朗读。
应该 进行几次 next 的循环 也算是不在同一时间 (可能要用毫秒来区分!)
但 异步朗读 就 不会朗读完整。
同步 就可以 。。。
代码如下
Dim sp As New DotNetSpeech.SpVoice()
If Forms("出货管理板").Opened Then
Dim dt As DataTable = DataTables("出货基础信息表")
For Each dr As DataRow In dt.DataRows
If dr("单") = True Then
For i As Integer = 2 To 4
If dr(dt.DataCols(i).Name) = Format(Date.Now,"HH:mm") Then
Dim str As String = (dr(dt.DataCols("客户")) & "," & dr(dt.DataCols(1).Name) & "," & dt.DataCols(i).Name.Replace("计划开始","") & ",时间," & Format(dr(dt.DataCols(i).Name),"HH:mm") & "到了,请作业!")
sp.Speak(str ,DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync) ' DotNetSpeech.SpeechVoiceSpeakFlags.SVSFDefault)
End If
Next
End If
Next
End If
颜色部分 异步朗读 老是读不出来。
[此贴子已经被作者于2015-1-13 12:14:39编辑过]