Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
Select Case Asc(e.KeyChar)
Case 48 'ตรงนี้คือค่าคีย์แชร์ครับ
My.Computer.Audio.Play(My.Resources.Resource1._0'ตรงนี้คือชื่อไฟล์เสียง, AudioPlayMode.WaitToComplete)
Case 48 + 1'จะใส่49ก็ได้น่ะมีค่าเท่ากัน
My.Computer.Audio.Play(My.Resources.Resource1._1, AudioPlayMode.WaitToComplete)
Case 48 + 2
My.Computer.Audio.Play(My.Resources.Resource1._2, AudioPlayMode.WaitToComplete)
Case 48 + 3
My.Computer.Audio.Play(My.Resources.Resource1._3, AudioPlayMode.WaitToComplete)
Case 48 + 4
My.Computer.Audio.Play(My.Resources.Resource1._4, AudioPlayMode.WaitToComplete)
Case 48 + 5
My.Computer.Audio.Play(My.Resources.Resource1._5, AudioPlayMode.WaitToComplete)
Case 48 + 6
My.Computer.Audio.Play(My.Resources.Resource1._6, AudioPlayMode.WaitToComplete)
Case 48 + 7
My.Computer.Audio.Play(My.Resources.Resource1._7, AudioPlayMode.WaitToComplete)
Case 48 + 8
My.Computer.Audio.Play(My.Resources.Resource1._8, AudioPlayMode.WaitToComplete)
Case 48 + 9
My.Computer.Audio.Play(My.Resources.Resource1._9, AudioPlayMode.WaitToComplete)
End Select
End Sub