首先建10个声音文件,分别是0-9的读音,调用API
Const SND_FILENAME As Integer = &H20000
Const SND_ALIAS As Integer = &H10000
Const SND_SYNC As Integer = &H0
Private Declare Auto Function PlaySound Lib "winmm.dll" (ByVal lpszSoundName As String, ByVal hModule As Integer, ByVal dwFlags As Integer) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mstrfileName As String = "c:\1.wav"
PlaySound(mstrfileName, 0, SND_FILENAME)
End Sub