[英]How to play next audio using VB.Net?
I have two textbox. 我有两个文本框。 I want to play audio 1 to audio 4 then it will play audio1, audio2, audio3 and audio4
我想将音频1播放为音频4,然后它将播放音频1,音频2,音频3和音频4
Sub play()
For i As integer = textbox1.Text To textbox2.Text
My.Computer.Audio.Play("D:\Audio\audio1", AudioPlayMode.Background)
(goo.gl/nHGxMS) (goo.gl/nHGxMS)
still can't resolve 仍然无法解决
Try below code. 尝试下面的代码。
Sub play()
Dim fromValue As Integer
If Not Integer.TryParse(textbox1.Text, fromValue) Then
MessageBox.Show("Not an integer")
Return
End If
Dim toValue As Integer
If Not Integer.TryParse(textbox2.Text, toValue) Then
MessageBox.Show("Not an integer")
Return
End If
For i As Integer = fromValue To toValue
My.Computer.Audio.Play("D:\Audio\audio" & i.ToString, AudioPlayMode.WaitToComplete)
Next
End Sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.